AskString$

 

Purpose:

With this function, information can be requested from the user during printing. A typical example of use for this function would be in a project for a bank transfer form. Information that remains constant, such as name and bank details of the sender, can be integrated directly into the project as fixed text or variables. The transfer amount, however, will almost always be different. With the function AskString$(), this information can be requested from the user during printing.

At print time, a dialog will appear in which the needed information can be entered.

The dialog allows the entered value to be carried over. Abort with "Cancel".

With the button "All", the entered value will be automatically used for all future result for the AskString$ function during thus print job. This is useful when the value remains constant over all records.

Parameter:

String         The first parameter contains some descriptive text that will appear in the dialog. Since this is a formula, fixed text must be entered in quotation marks, for example "Transfer amount:”. This first parameter must be entered, all remaining parameters are optional. If no other parameter(s) is/are entered, the first string is also the default setting for the user input.

Boolean       (optional) The second parameter allows you to define whether the dialog should be shown once prior to printing (default, FALSE), or if the dialog should be shown for each record (TRUE).

String                 (optional) The third parameter contains the string that appears as the recommended value for the user input. Since this is a formula, fixed text must be entered in quotation marks, for example "50.00 USD".

Number            (optional) The last parameter defines the number of characters that can be entered by the user. A value of 16, for example, allows the user to enter a maximum of 16 characters.

Return value:

String

Example:

AskString$("Transfer amount",True,"50.00 USD",16)

Opens a dialog with the title "Transfer amount”, a recommended value of "50.00 USD” and a maximum of 16 characters. Since the second parameter is TRUE, the dialog will be shown for each record to be printed.