Explore Categories

 

 PDF

Procedural-User Interface Related Actions

MSG BOX

This action is used to Display a message box to the user. It comes back to the original screen on the pressing of a key. This can be used by the programmers to display intermediate values of variables during calculations, thus helping in error diagnosis.

Syntax

MSG BOX : <Title Expression> : <Message Expression> : <GreyBack Flag>

Where,

< Title Expression > is the value that is displayed on the title bar of the message window.

< Message Expression > is the actual message which is displayed in the box. This can be an expression as well, i.e., the variable values can be concatenated and displayed along with the message in the display area of the box.

< GreyBack Flag > indicates if the background window is to be greyed out during message display. It takes two values, i.e., YES/NO

Example

01 : MSGBOX : ”Return Value” : ##Factorial

Synchronous Message Box Actions – START MSG BOX and END MSG BOX

These are asynchronous message boxes, i.e., the message box continues to appear till the action ‘End Msg Box’ is encountered or the function is terminated, whichever is earlier. Unlike action ‘Msg Box’, this action is executed asynchronously, i.e., it does not expect a key press from user. When executed, it displays the message box, and continues to execute the subsequent Actions.

Syntax

Start MSG BOX : <Title Expression> : <Message Expression>

<Action 1>

:

<Action n>

End MSG BOX

Where,

< Title Expression > is the value that is displayed on the title bar of the message window.

Message Expression > is the actual message displayed in the box. It can be an expression as well, i.e., the variable values can be concatenated and displayed in the display area of the box.

Example

[Function : MsgBox Actions]

Variable : Counter : Number

Variable : TotalCount : Num b er : 100

Returns : Number

Local Formula : StrTotalCou n t : ($$S t ring:##TotalCo u nt)

Local Formula : StCounter : ($$String:##Counter)

00 : Start M sg Box : Stat u s : “T h is Function creates” + @StrTotalCount + “ Ledgers”

10 : Star t Progress : # # TotalCount : # # SVCurre n tCompa n y : “Creating Ledgers” : “Please wait”

20 : While : # #Count e r < ##TotalCount

30 : New Object : Ledger : “Ledger” + @StrCounter : Yes

40 : S e t Value : Name : ” Ledger” + @St r Counter

50 : S e t Value : Parent : ” Sundry Debtors”

60 : Save Target

70 : Increment : Count e r

80 : Show Progress : ##Counter

90 : E nd While

100 : End Progress

110 : End Msg Box

Here, the action ‘Start Msg Box’ invokes the message box and retains it till action ‘End Msg Box’ is encountered. Thus, the message box will continue to appear from label 00 to 110. In absence of ‘End Msg Box’, the msg box is automatically terminated when the Function MsgBox Actions ends.

Note: If nested Start Msg Box is executed, then the previous Message box is overwritten. At any time, only one Message Box can be displayed.

QUERY BOX

This action is used to Display a confirmation box to the user and ask for a Yes/No response.

Syntax

QUERY BOX : <Message Expression> : <GreyBack Flag> : <EscAsYes>

Where,

< Message Expression > is the message which is displayed inside the box. This can be an expression.

< GreyBack Flag > indicates if the background window is to be greyed out during message display. It takes two values, i.e., YES/NO

< Escape as Yes > is a flag which indicates the response when the user presses the ESC key. This can be specified as YES/NO. A YES value for this flag indicates that the response should be treated as YES on pressing of an ESC key.

 Query Box Ex

The action Query Box is used to display the query box with dual options, and waits for the user to select an option. The action Query Box Ex is a procedural action which invokes a predefined query box. This action displays the query box as per the behavior specified in the QueryBox definition, and displays multiple options as specified in the definition. The selected option can be accessed by using the function LastResult after this action.

Syntax

Query Box Ex : <Query Box Name>

Where < Query Box Name > is the name of the QueryBox definition.

Progress Bar Actions

Sometimes, a Function may take some time to complete the task. It is always better to indicate the user whether the task is occurring, how long the task might take and how much work has already been done. One way of indicating the amount of progress is to use an animated image. This can be achieved by using the following Actions:

  • START PROGRESS
  • SHOW PROGRESS
  • END PROGRESS

START PROGRESS

This action sets up the Progress Bar by mentioning the total number of steps involved in the task. In addition to this, the Title, SubTitle and Subject of the Progress Bar can also be given as parameters.

Syntax

START PROGRESS : <Number of steps> :< Title> [:< Sub Title> :< Subject>]

Where,

< Number of steps > denotes the whole task quantified as a number.

< Title >, < Sub Title > and < Subject > Shows the Title, Sub Title and Subject of the Progress Bar, respectively.

Example

START PROGRESS : ##TotalSteps : ”TDS Migration”:@@CmpMailName : ”MigrationgVouchers..”

SHOW PROGRESS

This action shows the current status o f the task to the user .

Syntax

SHOW PROGRESS : <Number of Steps Completed>

Where,

< Number of Steps Completed > is a number which denotes the amount of work completed.

Example:

SHOW PROGRESS : ##Counter

END PROGRESS

When a task is completed, the Progress Bar can be stopped by using the Action END PROGRESS. This Action does not take any parameter.

Syntax

END PROGRESS

 

 

TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */