Salesforce

Initial Mode Expression (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Initial Mode Expression (Magic xpa 4.x)

You can dynamically define the task mode by By Exp as the Initial Mode value. This will allow you to write an expression that will be evaluated at runtime to determine the Initial mode.

Note:

  • The result of the evaluation of the expression must be a valid Task Mode letter: M, C, D, or Q.
    For example, the expression: IF (A='QUERY','Q'MODE,'M'MODE)
    means that if variable A in the task has a value of 'QUERY', Magic xpa will start execution of this task in Q (Query) Mode. Otherwise, it will start execution in M (Modify) Mode.

  • The ‘As Parent’ task mode is not supported for the task mode expression.

  • The Initial Mode is evaluated as soon as task execution starts. If a legal value is not found at runtime for the expression used for dynamic definition of the Initial Mode of Operation, a message box pops up, displaying a prompt to notify the user of the problems and terminate the task.

  • For subforms, the expression is calculated only if the view needs to be changed. If the view remains the same, the task mode will also remain the same.

By using the MODE literal in the Initial Mode expression, as shown in the example above, you instruct Magic xpa to check the string content for valid task modes. Any character in that string which is not a valid task mode will be cleared automatically. The value represented by the characters in the string is stored in an internal representation. If the project is used with a Magic xpa system running with a non-English language configuration, the values in the string will be automatically changed to the corresponding values of the configuration's language.

Reference
Attachment 
Attachment