Framework:Macros: Difference between revisions

From CoPlanner 11
Jump to navigationJump to search
Created page with '__TOC__ A macro is a group of actions, each of which carries out a certain operation such as the opening of a form or the execution of a server command. With macros, you can auto…'
 
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
__TOC__
A macro is a group of actions, each of which carries out a certain operation such as the opening of a form or the execution of a server command. With macros, you can automate tasks that need to be performed frequently. For instance, you can create a macro that executes an import, i.e. deletes data, re-imports them and then opens a report if a user calls it up through a menu item.  
A macro is a group of actions, each of which carries out a certain operation such as the opening of a form or the execution of a server command. With macros, you can automate tasks that need to be performed frequently. For instance, you can create a macro that executes an [[Framework:Imports|import]], i.e. deletes data, reimports them and then opens a report if a user calls it up through a menu item.  


To give properties to the macro, open the macro by clicking the “Design“ button, or by clicking on the context menu with the right mouse button, or by double-clicking the batch designer. With the “New” menu item, you can also create a new macro here.
To give properties to the macro, open the macro by clicking the “Design“ button, or by clicking on the context menu with the right mouse button, or by double-clicking the batch designer. With the “New” menu item, you can also create a new macro here.
Line 10: Line 10:
:*Message
:*Message


The created actions will then be executed in the batch designer one after the other. The order of execution can be changed with the [[image:Icon Pfeil Up.jpg]] and [[image:Icon Pfeil Down.jpg]] buttons.
The created actions will then be executed in the batch designer one after the other. The order of execution can be changed with the [[image:Am_Icon_Pfeil_Up.jpg]] and [[image:Am_Icon_Pfeil_Down.jpg]] buttons.


[[image:Fw_Batch designer.jpg|thumb|center|Framework, Batch designer]]
[[image:Fw_Batch designer.jpg|thumb|center|Framework, Batch designer]]
Line 18: Line 18:
==NavAction==
==NavAction==


With NavActions, you can open masks, dimensions etc. In addition, NavActions can also execute formulae, imports etc. A description of all NavActions you find [[Framework:Navigation Action|here]].  
With NavActions, you can open masks, dimensions etc. In addition, NavActions can also execute [[Framework:Formulae|formulae]], [[Framework:Imports|imports]] etc. A description of all NavActions you find [[Framework:Navigation Actions|here]].  


[[image:Fw_Batch designer_NavAction.jpg|thumb|center|Framework, NavAction]]
[[image:Fw_Batch designer_NavAction.jpg|thumb|center|Framework, NavAction]]
Line 26: Line 26:
Various different server commands are available for choice
Various different server commands are available for choice


{| cellspacing="1" cellpadding="3" width={{{breite|80%}}} border="1"
{| class="wikitable" width={{{breite|80%}}}
|-
|- {{Tabellentitel}}
| style=background-color:#f6f6f6 |'''Command'''
| Command  
| style=background-color:#f6f6f6 |'''Description
| Description
|-
|-
|DBC Execute Procedure
|DBC Execute Procedure
Line 38: Line 38:
|-
|-
|Formula activate
|Formula activate
|This ServerCommand can activate or deactivate formulae. In addition, the formula “Macro active” can be set.  
|This ServerCommand can activate or deactivate [[Framework:Formulae|formulae]]. In addition, the formula “Macro active” can be set.  
|-
|-
|Activate formulae
|Activate [[Framework:Formulae|formulae]]
|Activates the CoPlanner formulae.
|Activates the CoPlanner [[Framework:Formulae|formulae]].
|-
|-
|Deactivate formulae
|Deactivate [[Framework:Formulae|formulae]]
|Deactivates the CoPlanner formulae.
|Deactivates the CoPlanner [[Framework:Formulae|formulae]].
|-
|-
|Reload PlanSecurity
|Reload PlanSecurity
Line 63: Line 63:
|All datasets within the selected plan of a table are recalculated. In addition, XML filters for the datasets can be specified here..
|All datasets within the selected plan of a table are recalculated. In addition, XML filters for the datasets can be specified here..
|-
|-
|Start import on the Server
|Start [[Framework:Imports|import]] on the Server
|Starts an import object on the Server. As each import object returns a ‘successful’ message, this ‘successful’ message can be suppressed with the “Activate feedback” parameter.
|Starts an import object on the Server. As each [[Framework:Imports|import object]] returns a ‘successful’ message, this ‘successful’ message can be suppressed with the “Activate feedback” parameter.
|-
|-
|Synchronize database
|Synchronize database
|Forces the synchronization of the CoPlanner server and the SQL server before further CoPlanner ServerCommands are executed.
|Forces the synchronization of the CoPlanner server and the SQL server before further CoPlanner ServerCommands are executed.
Complete pending calculations Forces the execution of all pending calculations (formulae). Then a database synchronization is forced before further ServerCommands are executed.
|-
|Synchronize dataobject
|(9.5 HF 1.8)Forces the synchronization of an CoPlanner table or dimension and the SQL server before further CoPlanner ServerCommands are executed.
|-
|Complete pending calculations
|Forces the execution of all pending calculations ([[Framework:Formulae|formulae]]). Then a database synchronization is forced before further ServerCommands are executed.
|-
|-
|Execute formula
|Execute formula
Line 74: Line 79:
|-
|-
|Change session parameter
|Change session parameter
|Changes the session properties. Here it can be specified, for instance, that the session context is executed in macro mode so that subsequently further formulae will be executed whose property is set to ‘Execute in macro mode’. For this purpose, please specify the following parameters:  
|Changes the session properties. Here it can be specified, for instance, that the session context is executed in macro mode so that subsequently further [[Framework:Formulae|formulae]] will be executed whose property is set to ‘Execute in macro mode’. For this purpose, please specify the following parameters:  
To change over to macro mode: MacroMode=1  
To change over to macro mode: MacroMode=1  
To leave the macro mode: MacroMode=0
To leave the macro mode: MacroMode=0
|-
|OLAP refresh
|Macro command to update OLAP connections (connections from CoPlanner server to  SSAS will be closed and rebuilt if necessary). In addition to updating the dimensions this command is directed to delete any possible ADOMD caches (Security). After restarting the client changed dimension members in CoPlanner should be obvious to the user.
|-
|Set Log Level
|For development purposes, all messages that are generated in the log can be shown in the console/Telnet in the Console. In real operation, it is not recommended because it can cause performance degradations.
Configuration:
[[image:Fw_Makrodesigner_Loglevel_setzen.jpg|thumb|center|Framework, Macro - Loglevel configuration]]
|}
|}


===Example: Delete table datasets===


Beispiel Tabellensätze löschen:
The task is to use one macro in order to delete all datasets from a table that belong to the logged in plan.
For this purpose, create a new macro and select “ServerCommand” as the action and perform the settings as shown in the following Figure.


Es sollen mit einem Makro alle Datensätze aus einer Tabelle gelöscht werden die zum angemeldeten Plan gehören.
[[image:Fw_Batch designer_Macro Delete table rows.jpg|thumb|center|Framework, Makro – Delete table rows]]
Legen Sie dazu ein neues Makro an und wählen Sie als Aktion „Serverbefehl“ und treffen Sie die Einstellungen wie in folgender Abbildung dargestellt.


[[image:Fw_Makrodesigner_Makro Tabellensätze löschen.jpg|thumb|center|Framework, Makro – Tabellensätze löschen]]
Call up the filter editor by clicking the [[image:Icon_Dateiauswahl.jpg‎]] button.


Rufen Sie den Filter – Editor auf mit einem Klick auf die Schaltfläche [[image:Icon_Dateiauswahl.jpg‎]].
[[image:Fw_Batch designer_Macro Filter Editor.jpg|thumb|center|Framework, Macro – Filter - Editor]]


[[image:Fw_Makrodesigner_Makro Filter Editor.jpg|thumb|center|Framework, Makro – Filter - Editor]]
From the combination list field, select the entry “BAB_Plan” and “Bike GmbH” in the “Enterprise” filter. By clicking the ‘Add’ button, this setting is applied. By replacing the criterion with the @Session_Enterprise_ID@ session variable, this filter always refers to the logged in enterprise.


Wählen Sie aus dem Kombinationslistenfeld den Eintrag „BAB_Plan“ und im Filter „Unternehmen“ die „Bike GmbH“ aus. Mit einem Klick auf die Schaltfläche „Hinzufügen“ wird diese Einstellung übernommen. Durch das Ersetzen des Kriteriums mit der [[Framework:Session-Variablen|Sessionvariable]] @Session_Unternehmen_ID@ bezieht sich dieser Filter immer auf das angemeldete Unternehmen.  
If you need this filter several times, you can save it with the “Save filter” command and reinsert it with “Load filter”.


Sollten Sie dieses Filter mehrmals benötigen, können Sie diesen mit dem Befehl „Filter speichern“ sichern und mit „Filter laden“ wieder einfügen.
===Example: Delete table datasets depending on an dimension attribute===


The task is to use one macro in order to delete all datasets from a table that belong to an attribute of a dimension. In this example all records will be deleted in table "Tab1" which contains in the attribute field the value "True" in the dimension.


==Meldung==
[[image:Fw_Makrodesigner_Makro Filter Editor01.png|thumb|center|Framework, Macro – Filter - Editor]]


Dem Anwender können mit Meldungen Informationen über die Ausführung des Makros am Client angezeigt werden. Dazu wird der Meldungstext, Meldungstitel und der Meldungstyp eingegeben.
{| class="wikitable" width={{{breite|50%}}}
|- {{Tabellentitel}}
| Column
| Expression
|-
|Feld
|Standard Dimension Column Name
|-
|Comparison type
|Has to match with the data type(me ist =, not_me ist <>, usw.)
|-
|Criterion
|Has to match with the data type
|-
|Type
|BY_ATTRIBVAL_FeldNameInDim (In this example the attribute field is named "AttribFeld")
|}
 
==Message==


[[image:Fw_Makrodesigner_Meldung.jpg|thumb|center|Framework, Makro - Meldung]]
Information about the execution of the macro at the client can be shown to the user with messages. For this purpose, enter the message text, message title and message type.


===Meldungstypen===
[[image:Fw_Batch designer_Message.jpg|thumb|center|Framework, Macro - Message]]


===Types of messages===


{|  cellspacing="1" cellpadding="3" width={{{breite|100%}}} border="1"
 
{|  class="wikitable" width={{{breite|100%}}}
|-
|-
|'''Fehler'''
|'''Error'''


[[image:Fw_Makrodesigner_Meldung_Fehler.jpg|thumb|center|Framework, Makro - Meldung - Fehler]]
[[image:Fw_Fw_Batch designer_Fehler.jpg|thumb|center|Framework, Macro - Message - Error]]
|'''Ausnahme'''
|'''Exception'''


[[image:Fw_Makrodesigner_Meldung_Ausnahme.jpg|thumb|center|Framework, Makro - Meldung - Ausnahme]]
[[image:Fw_Batch designer_Ausnahme.jpg|thumb|center|Framework, Macro - Message - Exception]]
|'''Information'''
|'''Information'''


[[image:Fw_Makrodesigner_Meldung_Information.jpg|thumb|center|Framework, Makro - Meldung - Information]]
[[image:Fw_Batch designer_Information.jpg|thumb|center|Framework, Macro - Message - Information]]
|'''Frage'''
|'''Question'''


[[image:Fw_Makrodesigner_Meldung_Frage.jpg|thumb|center|Framework, Makro - Meldung - Frage]]
[[image:Fw_Batch designer_Frage.jpg|thumb|center|Framework, Macro - Message - Question]]
|-
|-
|'''Kein Symbol'''
|'''No Symbol'''


[[image:Fw_Makrodesigner_Meldung_Kein_Symbol.jpg|thumb|center|Framework, Makro - Meldung - Kein Symbol]]
[[image:Fw_Batch designer_Kein_Symbol.jpg|thumb|center|Framework, Macro - Message - No Symbol]]
|'''Stop'''
|'''Stop'''


[[image:Fw_Makrodesigner_Meldung_Stop.jpg|thumb|center|Framework, Makro - Meldung - Stop]]
[[image:Fw_Batch designer_Stop.jpg|thumb|center|Framework, Macro - Message - Stop]]
|'''Warnung'''
|'''Warning'''


[[image:Fw_Makrodesigner_Meldung_Warnung.jpg|thumb|center|Framework, Makro - Meldung - Warnung]]
[[image:Fw_Batch designer_Warnung.jpg|thumb|center|Framework, Macro - Message - Warning]]
|}
|}




==Fortsetzungsbedingung==
==Continuation condition==
 
The continuation condition is available to influence the continuation of the macro. If it is activated, the condition must be fulfilled to continue with the macro. If the condition is not fulfilled, the macro is stopped at exactly this point. It is possible to display a message to indicate that the macro has been aborted.


Die Fortsetzungsbedingung dient dazu, um die Weiterführung des Makros steuern zu können. Wird sie aktiv geschalten, muss die Bedingung zutreffen, um mit dem Makro fortzufahren. Trifft die Bedingung nicht zu, wird das Makro genau an der Stelle beendet. Es besteht die Möglichkeit mittels einer Meldung auf den Abbruch hinzuweisen.
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Inaktiv.jpg|thumb|center|Framework, Macro - Continuation condition - Inaktiv]]


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Inaktiv.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Inaktiv]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Aktiv.jpg|thumb|center|Framework, Macro - Continuation condition - Aktiv]]


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Aktiv.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Aktiv]]
For the condition, both expression fields must be filled in. An expression can be a query to the CoPlanner Server through the functions provided by the totality of business economics formulae, an SQL statement to the CoPlanner system database or a constant value. The query to the CoPlanner Server is identified with Transform=, an SQL server query with Sql=. A constant value is entered without special identification.


Es müssen für die Bedingung beide Ausdrucksfelder befüllt werden. Ein Ausdruck kann eine Abfrage zum CoPlanner Server mittels der Funktionen die das Rechenwerk bereitstellt, ein SQL Statement auf die CoPlanner Systemdatenbank oder ein konstanter Wert sein. Die Abfrage zum CoPlanner Server wird mittels Transform=, eine SQL Server Abfrage mittels Sql= gekennzeichnet. Ein konstanter Wert wird ohne besondere Kennung eingetragen.
Examples:


Beispiele:
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Sql kombiniert mit CoPlanner Abfrage.jpg|thumb|center|Framework, Macro - Continuation condition – SQL combined with CoPlanner query]]


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Sql kombiniert mit CoPlanner Abfrage.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung – Sql kombiniert mit CoPlanner Abfrage]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Sql kombiniert mit konstantem Wert.jpg|thumb|center|Framework, Macro - Continuation condition - SQL combined with constant value]]


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Sql kombiniert mit konstantem Wert.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Sql kombiniert mit konstantem Wert]]
In case of constant values, the data type must be observed. If the SQL or CoPlanner query returns a sequence of characters as a result, the value must be surrounded by single quotation marks. If the query returns a numeric value as a result, the quotation marks are omitted.


Bei konstanten Werten muss der Datentyp beachtet werden. Liefert die SQL bzw. CoPlanner Abfrage als Ergebnis eine Zeichenfolge, muss der Wert unter einfache Anführungszeichen gestellt werden. Liefert die Abfrage als Ergebnis einen numerischen Wert, entfallen die An-führungszeichen.
If an SQL query is defined that does not return a value but a results table, then the value of the left top corner is used for the comparison.
Wird eine SQL Abfrage definiert, welche nicht genau einen Wert, sondern eine Ergebnistabelle liefert, wird der Wert der linken, oberen Ecke für den Vergleich herangezogen.


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Ergebnis bei Abfrage mit Tabelle als Ergebnis.jpg|center|Framework, Makro - Fortsetzungsbedingung - Ergebnis bei Abfrage mit Tabelle als Ergebnis]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Ergebnis bei Abfrage mit Tabelle als Ergebnis.jpg|center|Framework, Macro - Continuation condition - Result of a query with table as a result]]


Liefert die SQL Abfrage keine einzige Zeile, so kann dies mittels der Konstante ‘NULL‘ abgefragt werden.
Whether the SQL query does not return a single line can be queried with the ‘ZERO’ constant.  


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Abfrage ob Datensätze geliefert werden.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Abfrage ob Datensätze geliefert werden]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Abfrage ob Datensaetze geliefert werden.jpg|thumb|center|Framework, Macro - Continuation condition - Query whether datasets are supplied]]


Ausdrücke können auch mit CoPlanner [[Framework:Session-Variablen|Sessionvariablen]] versehen werden. Vor der eigent-lichen Evaluierung des Ausdrucks werden diese durch den entsprechenden Wert ersetzt. [[Framework:Session-Variablen|Sessionvariablen]] können auch als konstanter Wert verwendet werden.
Expressions can also receive CoPlanner session variables. Before the evaluation of the expression proper, these are replaced with the corresponding value. Session variables can also be used as a constant value.


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Abfrage mit Session Variable.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Abfrage mit Session Variable]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Abfrage mit Session Variable.jpg|thumb|center|Framework, Macro - Continuation condition - Query with session variable]]


Ist die Option „Meldung bei Nichterfüllung“ aktiviert, wird bei Abbruch des Makros dem Be-nutzer die Meldung mit dem entsprechenden Text angezeigt. Ist die Option nicht aktiv, wird das Makro ohne weitere Meldung beendet.
If the option “Report in case of non-fulfillment” is activated, the user is shown the message with the corresponding text if the macro is aborted. If the option is not active, the macro will be aborted without further message.


[[image:Fw_Makrodesigner_Fortsetzungsbedingung Meldung bei Nichterfüllung.jpg|thumb|center|Framework, Makro - Fortsetzungsbedingung - Meldung bei Nichterfüllung]]
[[image:Fw_Batch_Designer_Fortsetzungsbedingung Meldung bei Nichterfuellung.jpg|thumb|center|Framework, Macro - Continuation condition - Message in case of non-fulfillment]]




__NOEDITSECTION__  
__NOEDITSECTION__  


[[Category:Framework|Makros]][[Category:Framework Objekte|Makros]]
[[Category:Framework|Macros]][[Category:Framework Objects|Macros]]
[[de:Framework:Makros]]

Latest revision as of 11:18, 12 September 2017

A macro is a group of actions, each of which carries out a certain operation such as the opening of a form or the execution of a server command. With macros, you can automate tasks that need to be performed frequently. For instance, you can create a macro that executes an import, i.e. deletes data, reimports them and then opens a report if a user calls it up through a menu item.

To give properties to the macro, open the macro by clicking the “Design“ button, or by clicking on the context menu with the right mouse button, or by double-clicking the batch designer. With the “New” menu item, you can also create a new macro here. Several actions can be defined in the batch designer. Additionally, you can assign a comment to these actions.

Available actions:

  • NavAction
  • ServerCommand
  • Message

The created actions will then be executed in the batch designer one after the other. The order of execution can be changed with the and buttons.

Framework, Batch designer

Depending on the chosen action, the user has different configuration options available.

NavAction

With NavActions, you can open masks, dimensions etc. In addition, NavActions can also execute formulae, imports etc. A description of all NavActions you find here.

Framework, NavAction

ServerCommand

Various different server commands are available for choice

Command Description
DBC Execute Procedure Stored Procedures can be executed. The name of the Stored Procedure must coincide precisely with the name of the Stored Procedure of the SQL Server (for instance sp_calc_table). In addition, parameters of the Stored Procedure can be transferred. The individual parameters are separated with “;”, and they all start with an “@” (for instance: @param1=FirstParameter;@param2=SecondParameter). The Database Connection String looks as follows: Server=ServerName;Initial Catalog=DatabaseName;user id=MyUserId; password=MyPassword
Delete plan datasets The ServerCommand ‘Delete datasets’ deletes all datasets of the selected plan of all plan-dependant tables. If the plan is set to “Current plan”, only datasets of the plan where the user is logged in are deleted.
Formula activate This ServerCommand can activate or deactivate formulae. In addition, the formula “Macro active” can be set.
Activate formulae Activates the CoPlanner formulae.
Deactivate formulae Deactivates the CoPlanner formulae.
Reload PlanSecurity Reloads the security for the current plan.
Copy plan Copies all datasets from one plan to another plan.
Copy table datasets All datasets within the selected plan of a table are copied into another table. In addition, XML filters for the datasets can be specified here.
Delete table datasets All datasets within the selected plan of a table are deleted. In addition, XML filters for the datasets can be specified here.

Apart from the selection of the table, it is also necessary to select a plan for deletion. This can be done by explicitly selecting a certain plan, or with the “Current plan” function, which automatically selects the plan of the login. If the option “independent of plan” is chosen, the data of the selected table are deleted from all plans! See example below.

Recalculate table of this plan All datasets within the selected plan of a table are recalculated. In addition, XML filters for the datasets can be specified here..
Start import on the Server Starts an import object on the Server. As each import object returns a ‘successful’ message, this ‘successful’ message can be suppressed with the “Activate feedback” parameter.
Synchronize database Forces the synchronization of the CoPlanner server and the SQL server before further CoPlanner ServerCommands are executed.
Synchronize dataobject (9.5 HF 1.8)Forces the synchronization of an CoPlanner table or dimension and the SQL server before further CoPlanner ServerCommands are executed.
Complete pending calculations Forces the execution of all pending calculations (formulae). Then a database synchronization is forced before further ServerCommands are executed.
Execute formula Executes the selected formula.
Change session parameter Changes the session properties. Here it can be specified, for instance, that the session context is executed in macro mode so that subsequently further formulae will be executed whose property is set to ‘Execute in macro mode’. For this purpose, please specify the following parameters:

To change over to macro mode: MacroMode=1 To leave the macro mode: MacroMode=0

OLAP refresh Macro command to update OLAP connections (connections from CoPlanner server to SSAS will be closed and rebuilt if necessary). In addition to updating the dimensions this command is directed to delete any possible ADOMD caches (Security). After restarting the client changed dimension members in CoPlanner should be obvious to the user.
Set Log Level For development purposes, all messages that are generated in the log can be shown in the console/Telnet in the Console. In real operation, it is not recommended because it can cause performance degradations.

Configuration:

Framework, Macro - Loglevel configuration

Example: Delete table datasets

The task is to use one macro in order to delete all datasets from a table that belong to the logged in plan. For this purpose, create a new macro and select “ServerCommand” as the action and perform the settings as shown in the following Figure.

Framework, Makro – Delete table rows

Call up the filter editor by clicking the button.

Framework, Macro – Filter - Editor

From the combination list field, select the entry “BAB_Plan” and “Bike GmbH” in the “Enterprise” filter. By clicking the ‘Add’ button, this setting is applied. By replacing the criterion with the @Session_Enterprise_ID@ session variable, this filter always refers to the logged in enterprise.

If you need this filter several times, you can save it with the “Save filter” command and reinsert it with “Load filter”.

Example: Delete table datasets depending on an dimension attribute

The task is to use one macro in order to delete all datasets from a table that belong to an attribute of a dimension. In this example all records will be deleted in table "Tab1" which contains in the attribute field the value "True" in the dimension.

Framework, Macro – Filter - Editor
Column Expression
Feld Standard Dimension Column Name
Comparison type Has to match with the data type(me ist =, not_me ist <>, usw.)
Criterion Has to match with the data type
Type BY_ATTRIBVAL_FeldNameInDim (In this example the attribute field is named "AttribFeld")

Message

Information about the execution of the macro at the client can be shown to the user with messages. For this purpose, enter the message text, message title and message type.

Framework, Macro - Message

Types of messages

Error
Framework, Macro - Message - Error
Exception
Framework, Macro - Message - Exception
Information
Framework, Macro - Message - Information
Question
Framework, Macro - Message - Question
No Symbol
Framework, Macro - Message - No Symbol
Stop
Framework, Macro - Message - Stop
Warning
Framework, Macro - Message - Warning


Continuation condition

The continuation condition is available to influence the continuation of the macro. If it is activated, the condition must be fulfilled to continue with the macro. If the condition is not fulfilled, the macro is stopped at exactly this point. It is possible to display a message to indicate that the macro has been aborted.

Framework, Macro - Continuation condition - Inaktiv
Framework, Macro - Continuation condition - Aktiv

For the condition, both expression fields must be filled in. An expression can be a query to the CoPlanner Server through the functions provided by the totality of business economics formulae, an SQL statement to the CoPlanner system database or a constant value. The query to the CoPlanner Server is identified with Transform=, an SQL server query with Sql=. A constant value is entered without special identification.

Examples:

Framework, Macro - Continuation condition – SQL combined with CoPlanner query
Framework, Macro - Continuation condition - SQL combined with constant value

In case of constant values, the data type must be observed. If the SQL or CoPlanner query returns a sequence of characters as a result, the value must be surrounded by single quotation marks. If the query returns a numeric value as a result, the quotation marks are omitted.

If an SQL query is defined that does not return a value but a results table, then the value of the left top corner is used for the comparison.

Framework, Macro - Continuation condition - Result of a query with table as a result
Framework, Macro - Continuation condition - Result of a query with table as a result

Whether the SQL query does not return a single line can be queried with the ‘ZERO’ constant.

Framework, Macro - Continuation condition - Query whether datasets are supplied

Expressions can also receive CoPlanner session variables. Before the evaluation of the expression proper, these are replaced with the corresponding value. Session variables can also be used as a constant value.

Framework, Macro - Continuation condition - Query with session variable

If the option “Report in case of non-fulfillment” is activated, the user is shown the message with the corresponding text if the macro is aborted. If the option is not active, the macro will be aborted without further message.

Framework, Macro - Continuation condition - Message in case of non-fulfillment