Salesforce

Initial Mode (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Initial Mode (Magic xpa 2.x)

This property defines the Mode of Operation in which execution of the task starts.

You can allow the end user to change this mode during execution, by setting to Yes the suitable Allow properties in the Options tab of the Task Properties dialog box.

You can specify the Mode of Operation to be defined statically, by assigning a specific mode (see the table below) in the Initial Mode property, or dynamically, by selecting the By Exp option.

The modes that can be selected are shown in the table below.

Mode
Letter

Mode
Name

Allows the end user to...

M

Modify

Edit existing records and delete records. This is the default mode.
When you are in Modify mode, you can also create records. This is a specific mode in Magic xpa called Create in Modify. You can move to this mode by using the Ctrl+M keyboard shortcut.

C

Create

Create new records. When you are in Create mode you can only see the records that you have added in the current session. To view all of the records, you need to switch to Query or Modify mode. You can move to this mode by using the Ctrl+E keyboard shortcut.

D

Delete

Delete all records of the data view. Available in non-interactive Rich Client tasks and Batch tasks. Non-interactive Rich Client support – Since version: 2.4

Q

Query

Scan through records, without updating the records or deleting them. You can move to this mode by using the Ctrl+Q keyboard shortcut. This is the mode you want for “lookup” or “view only” tasks. However, the user can still change the mode from Query to Modify by selecting Options->Modify Records (Ctrl+M), unless you prevent that by also setting Task Properties->Options->Allow Options to No.

In Batch, the data sources are opened in Read Only mode, which does not allow any update to the scanned records, even if the data source itself was opened for Write access.

See also Query Mode Behavior.

P

As Parent

Run a task or program whose mode is identical to that of its parent in runtime. If a program with the As Parent task mode in runtime is not called by another program called from the menu, the task mode defaults to Query.
When the Parallel Execution task property is set to True, setting this property to As Parent will appear as an error when you run the Check Syntax.

If a program with the As Parent task mode is called in a subform, then this property is evaluated:

  • In Online – whenever the subform task is opened.

  • In Rich Client – whenever the parent task mode is changed. (Since version: 2.2a)
    On mobile devices, the property will be evaluated once when the subform task is loaded.

E

By Exp

Specify an expression in the Initial Mode Exp property, which will be evaluated dynamically at runtime to determine the Initial Mode.

In an Online task, the end user can change the initial Mode of Operation by selecting at runtime those modes you have allowed in the Task Properties dialog box. In a Batch task, the initial Mode of Operation cannot be changed during task execution.

The engine scans and executes operations, regardless of the Mode of Operation. You can restrict the execution of an operation based on the actual Mode of Operation during execution by using an expression containing the Stat function in the Cnd (Condition) column.

The modes of operation pertain to the task’s Main Source only.

Modes of operation do not affect creation or modification of any database tables linked to the Main Source. The type of Link operation used to link the table determines its creation and modification of records. For more information, refer to the Link operation.

Related Topics

Reference
Attachment 
Attachment