FPL Script Command Syntax
Arithmetic
calculations and rounding
Date and Time field arithmetic
set
column displayonly/hidden/mandatory
set
control displayonly/hidden/mandatory/hyperlink
set
field displayonly/hidden/mandatory/hyperlink
set
group displayonly/hidden/mandatory
unset
column displayonly/hidden/mandatory
unset
control displayonly/hidden/mandatory/hyperlink
unset
field displayonly/hidden/mandatory/hyperlink
unset
group displayonly/hidden/mandatory
See also: FPL Functions Syntax, FPL System Variables
· Each command statement must be terminated by a semi-colon with the exception of the if/else/endif and loop/endloop statements
· Literal values should be enclosed within single quotes
· A single quote contained within a literal should be escaped using a backslash (\) e.g. 'Simon\'s guitar'
· The script editor contains a verify function (available from the Script menu) which can be used to check syntax
· A script command that generates an error at runtime will result in the display of the configured error page showing the error. Additional information on the error and on the behaviour of scripts can be found by adjusting the logging level (see Runtime parameters)
· Comments may be inserted anywhere in a script. A comment starts with //. The rest of the line is ignored
FPL is a case insensitive language even though most of the elements it operates on are case sensitive. For example, a field named myHeaderText can be set with any of these statements:
myHeaderText
= 'xxxx';
MYHEADERTEXT = 'xxxx';
myheadertext
= 'xxxx';
myHEADertext
= 'xxxx';
This applies equally to the names of all Verj.io elements that can be referenced by an FPL statement e.g. fields, tables, columns, controls, pages, texts, resources, templates etc. Note that there are a few exceptions where FPL is case sensitive and these are all explicitly stated in this document. The general rule is that it is case insensitive.
A local variable is a variable that exists only within the scope of the script where it is defined. Local variables can be declared at any point in a script, but must be declared before they are referenced.
Syntax: |
type VARIABLENAME1 [ , VARIABLENAME2, VARIABLENAME3, …VARIABLENAMEn ] [ = expression ];
type can be specified in any case and is one of: · bool (shortcut for boolean) · boolean · char (shortcut for character) · character · date · datetime · int (shortcut for integer) · integer · num (shortcut for numeric) · numeric · time
|
|
VARIABLENAME1, VARIABLENAME2 etc are names of local variables to be created. expression is optional and is applied to all declared variables (See assignment statements).
|
Examples: |
char W1; char W1, W2, W3; char W1 = 'Fred'; int i1, i2, i3 = 1; char W4 = trim(PRODUCT_DESCRIPTION); date d1 = $SYSTEM_DATE;
|
A local table is a table that exists only within the scope of the script where it is defined. Local tables can be declared at any point in a script, but must be declared before they are referenced. Columns can be modelled on another table definition, either a form-level table or another local table, and columns can also be locally defined.
Syntax: |
table TABLENAME [ like MODELTABLENAME ] [COL1TYPE COL1NAME [ , COL2TYPE COL2NAME…] ];
TABLENAME is the name of the table to be created. This name is also used to prefix all column names, see examples below. MODELTABLENAME is the name of another form-level or local table from which column definitions are copied. |
|
COLnTYPE, COLnNAME etc are the types and names of the table columns.
If the like clause is not specified, at least one column must be defined.
|
Examples: |
table WTAB1 char COL1, int COL2; insertrow WTAB1; WTAB1-COL1 = 'Row 1'; insertrow WTAB1; WTAB1-COL1 = 'Row 2';
table W_CUST like CUSTOMERS; table W_REQUESTS like REQUESTS char WCOL1, date WDATE; |
Assignment statements are used to assign a value to a local variable, a form field or a table column or to assign a value to a property. The left-hand side of an assignment expression specifies the target object to be assigned and can be specified in any case unless specifically stated otherwise. The right-hand side contains an assignment expression which may be any of:
in combination with supported unary operators. Supported unary operators are +, -, /, * denoting addition, subtraction, division and multiplication.
The word SET can optionally appear as the first word in an assignment expression.
Examples:
int1 = 100;
result_w = F2 + F3 - 200;
F4 = uppercase( F10 + 'B');
num1 = Round ( ( F2 + getquote ( F1,repayment(F2*F3) ) ) - (F3 - 100)*(F3+F4) );
F2 = '31/12/1981' + 50;
BUTTON1.backgroundColor = 'red';
SET FIELD2 = 'boy\'s toys';
Conditional expressions are used in if statements and loop statements and are used as filter expressions for Table Controls and Repeater Controls. Conditional expressions can contain a combination of local variables, form fields, table columns, literals, system or customer defined functions, with supported unary, boolean and conditional operators. A conditional expression must return a value of TRUE or FALSE.
Supported unary operators are +, -, /, * denoting addition, subtraction, division and multiplication respectively.
Supported conditional operators are >, <, >=, <=, =, != denoting greater than, less than, greater than or equal, less than or equal, equal and not equal to respectively.
Supported boolean operators are AND, OR, and ! denoting boolean AND, OR and NOT respectively.
Examples:
if [ f1 > 1 ]
if [ f1 > f2 + f3 + 100]
if [ (F1 + F2) = (F3 - F4) ]
if [ F2 != (F2 * F3) ]
if [ !(F2 = F3) ]
if [ ( ( repayment (F1,F2+F3) > 100 or ( (F1 < F2 - 1000) and F3 != F4/F5) ) ) or F2 = 'A' ) ]
loop [ counter >= 100 ]
Verj.io is capable of performing arithmetic calculations with a great degree of accuracy. Each numeric or currency field can hold up to 17 significant digits including decimal places. Values with more than 17 significant digits will be rounded.
It is important to note that Verj.io rounds numeric values each time a value is assigned to a field. The rounding depends on the number of decimal places and the rounding algorithm specified for the target field. For example, the statement:
set F1 = 1.23745;
Will produce different results depending on the number of decimal places declared for the target field F1:
1.24 |
(2 decimal places) |
1.237 |
(3 decimal places) |
1.2375 |
(4 decimal places) |
1.23745 |
(5 decimal places) |
Because rounding is applied each time a value is assigned to a field, it can be important to pay close attention to the number of decimal places and also the number of statements used for a calculation. e.g. if F1 is declared with 2 decimal places, the statement:
set F1 = 9.3283 * 1.478431 / 100;
Produces the correct result: 0.14.
However if this is coded as 2 statements:
set F1 = 9.3283 / 100;
set F1 = F1 * 1.478431;
The result is 0.13 as the rounding algorithm has been applied twice.
For arithmetic operations applied to fields of type DATE, numeric constants are taken to represent a number of days e.g.
set DATE1 = DATE1 + 10;
will add 10 days to field DATE1.
For arithmetic operations applied to fields of type TIME or DATETIME, numeric constants are taken to represent a number of seconds e.g.
set TIME1 = TIME1 + (30 * 60);
will add 30 minutes to field TIME1.
All date literals entered in scripts (e.g. example above under Date Arithmetic) or as default values must be entered in the format defined using server property Date Literal Format. e.g. for date format mm.dd.yyyy, an appropriate statement to set a date value would be:
set MY_DATE_FIELD = '02.29.2004';
and for date format dd/mm/yyyy, it would be:
set MY_DATE_FIELD = '29/02/2004';
Time literals entered in scripts or as default values can be entered as either HH:MM, HH:MM:SS or HH:MM:SS.TTT. e.g.
set MY_TIME_FIELD = '10:49:22';
Datetime literals entered in scripts or as default values can be entered by combining the formats shown above for date and time literals. e.g.
set MY_DATETIME_FIELD = '29/02/2004 10:49:22';
Environment variables are variables that are defined externally. These can be very useful for defining things that vary with each server instance e.g. a file path or external URL. Environment variables can be included in FPL statements – see using environment variables for more information.
A number of read-only properties of tables and fields can be accessed using syntax fieldname.propertyname. e.g.
if [ EMP_TABLE.rowcount > 0 ]
…
endif
set xxx = f1.presentationType;
set xxx = f2.valuelength;
These property expressions can be used at any point in FPL where a field can be used. Field and table properties are not case sensitive i.e. T1.ROWCOUNT, t1.rowcount, t1.rowCount can all be used.
The following table properties are available:
Property |
Description |
rowCount |
The number of rows in the table. This property is read only. |
currentRow |
This property contains the internal row number of the table and is both read/write. See programming with row numbers for more details. |
See also the set table command for additional table display properties that can be set.
The following read only field properties are available:
Property |
Description |
name |
Field name |
type |
Field type. This will be one of the following: BOOLEAN CURRENCY DATE DATETIME INTEGER NUMERIC TIME |
presentationType |
Field presentation type. This will be one of the following: BUTTON LABEL PASSWORD RADIO SELECT (Dropdown list) TEXT TEXTAREA |
maximumLength |
Maximum number of characters that can be entered |
valueLength |
Length of the current value |
formattedValue |
Returns the value for the field formatted according to the formatting language in use for the form. For numeric fields, formatting commas are included. Date and time fields are presented in the same format as seen by the end user running the form |
unformattedValue |
Returns the value for the field. For numeric fields, any formatting commas are removed and the decimal point i.e. comma or point, will be taken from the formatting language used for the system’s default language. For date fields, the value returned is in the format configured in server property Date Literal Format. |
Most control properties can be accessed using syntax controlname.propertyname. See Accessing Control Properties from FPL for details. Details of property names and types can be found in the documentation for each control.
The system variable $COMMAND_STATUS contains the status of the previously executed script command and can be queried. The value 'OK' indicates successful execution for all commands. The error statuses that can be returned are listed under the commands below. This example shows querying the feedback from a lock command and notifying the user that a resource is not available:
lock 'MATERIAL' MATERIAL_ID;
if [ $COMMAND_STATUS = 'ERROR' ]
message E,Msg1, MATERIAL_ID;
endif
Additionally, some FPL statements support the NOFAIL keyword – generally the statements that support this option are those that access some sort of external system and may therefore be susceptible to unpredictable failures. When specified, the command returns an error status instead of generating a runtime error. NOFAIL is supported by the following commands: call, exec, fetch, fetchtable.
Finally, all runtime errors can be caught with a form-wide on error event. Typically this event is used to allow an application to fail gracefully i.e. display an error page.
Syntax: |
abort [ expression ]; |
|
|
aborts execution of the current form and rolls back the current transaction. If an on error event is specified for the form, this will receive control. Otherwise the default system abort page is displayed.
System variable $ABORT_MESSAGE is set with the abort reason supplied in expression. System variable $ABORT_PAGE is set with the current page or null if there is no current page e.g. when running a before or after form event. |
|
|
|
Examples: |
abort; abort 'Access denied to payroll data'; abort 'Error occurred: ' + ERROR_DETAIL; |
$COMMAND_STATUS: |
Not applicable |
Syntax: |
break;
This command can only be coded between loop and endloop statements |
|
|
Description: |
immediately stops execution of the current loop and proceeds with execution of the first statement following the endloop. If loop statements are nested, the break statement applies to the loop at the same level as the break statement. |
|
|
Examples: |
loop at table EXPENSES set COUNTER = 0; loop set COUNTER = COUNTER + 1; if [ COUNTER > 1000 ] log 'Breaking inner loop'; break; endif endloop endloop |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
call RESOURCE [ ( component_prefix ) [ BINDING ] [ NOFAIL ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of a Web Service Resource, XML Resource or Custom Resource, or the name of a form field containing a resource name. BINDING is optional. For calls to a Web Service resource or XML Resource, this represents the adapter name. |
|
NOFAIL is optional; when specified, any errors are returned in $COMMAND_STATUS which should be checked for a value other than ‘OK’. When not specified, errors will result in termination of form execution.
|
Description: |
Used to call a Web Service Resource or XML Resource when BINDING can be specified as a form field. If BINDING is a literal, it should be enclosed in quotes. |
|
|
Examples: |
call CLIENT_CHECK; call FLIGHTS_WS 'LOG'; call SETDATE ( COMP1 );
call NI_CHECK NOFAIL; if [ $COMMAND_STATUS != 'OK' ] .. endif |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
ERROR |
- see Web Services Adapter for details |
|
NOT_FOUND |
- the specified adapter was not found |
|
Other values |
- when the NOFAIL option is used |
Syntax: |
callscript SCRIPTNAME [ ( parm1, parm2,…) ];
SCRIPTNAME is
the name of the script to be called or a form field or variable containing
the name of the script to be called. The script name is treated as a path
relative to the calling script’s folder e.g. callscript
S2 will search for that script in the same folder as the current script. An
absolute path (from the root of the project) can also be specified: e.g. callscript /Scripts/script3 parm1, parm2 etc are parameters that are passed to the called script. These parameters are passed by reference. These parameters can be any of the following:
Scripts written in any programming language can be called, but parameters can only be passed to scripts written in FPL. Any passed parameters should be declared as in parameters on the called script using the script statement. See calling scripts with FPL for more information. See also script statement; |
|
|
Description: |
The CALLSCRIPT command passes processing control to the named FPL script passing any parameters specified. The called script may return control to the calling script by issuing the return command; if no return command exists, control is returned to the calling script when the called script finishes executing. |
|
|
Examples: |
callscript SCRIPT2; callscript subscript1(f1, f2); callscript subscript2(requests_table); callscript subscript3(null, null, $SYSTEM_DATE); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
NOT FOUND |
- the script could not be found |
Syntax: |
call url [ GET | POST ] expression [,parm1=value1, parm2=value2.......];
GET or POST are optional and specify the HTTP method to be used for the call. If omitted, the default is specified in server property Call Url Method. Please note that when POST is specified, the system writes an additional HTML page to the browser to invoke the specified URL; this page is added to the browser’s history cache and interferes with the operation of the browser back button. The result is that the user will not be able to use the back button to navigate back from the called URL to the Verj.io form. For this reason, it is recommended that POST is only used when there is no alternative, or for forms which do not support the back button.
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements), that when resolved is treated as a URL. If an external URL is called, the full name including the protocol (e.g. http://) must be specified.
parm1, parm2... are the names of form fields in the called form which will receive the passed values value1, value2... can be either a quoted value, a numeric value or a form field
|
|
|
Description: |
suspends execution of the current form, committing the current transaction, and calls the specified URL. This command expects the called URL application to subsequently return to Verj.io. The called application can also set any Verj.io form field values on return by adding them to the return URL.
If the URL represented by expression might contain parameters which are not valid within a URL e.g. whitespace, ?, & etc, then these should be escaped using the urlencode function – see examples below. Note that values passed as parameters value1, value2 etc should not be escaped as this is done automatically by the system.
The return URL should invoke the ufsreturn servlet and include the Verj.io form session id parameter ebz i.e. the URL should be of the type domain/ufs/ufsreturn?ebz=xxxx e.g. http://mydomain/ufs/ufsreturn?ebz=1_1283432908172. The full return URL is supplied by the system in system variable $UFS_RETURN_URL and can be passed to the called application if required as shown in the example below. The return URL is also added automatically by the system as parameter ufsReturnURL.
Additional Verj.io form fields can be added to the return URL to pass status information back to the Verj.io form if required. The return call can be made using either HTTP GET or POST. Care should be taken to ensure that the domain name (or host name or ip address) used on the return URL is the same as the one used to initially invoke the Verj.io form. If these domain names are different, an error page will be displayed with the message:
'The request has timed out - please try again'
On return, the ebz parameter is used to load the appropriate form context and execution of this form is resumed from the point where the CALL command was executed. i.e. the FPL command following the CALL will be executed if there is one, or the next script in the sequence will be executed etc. If the ebz parameter is not supplied on the return URL, the most recent form context will be used. |
|
|
Examples: |
call url post PAYMENT_SYSTEM_URL, cardId=CREDIT_CARD_NO, amount=DEBIT_TOTAL; call url 'http://external.application/calledProg', parm1=F1, return=$UFS_RETURN_URL; // parameters passed separately call url 'http://external.application/calledProg?parm1=' + F1 + '&returnurl=' + urlencode($UFS_RETURN_URL); // parameters in expression
Return URL example: http://www.myco.com/ufs/ufsreturn?ebz=1_1283432908172&STATUS=OK&INFO_MESSAGE=Message150 |
|
|
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
call form FORMNAME [parm1=value1, parm2=value2.......]; call form expression [parm1=value1, parm2=value2.......];
FORMNAME is the name of the form to be called expression is a form field name containing the name of the form to be called as shown in the second example below. parm1, parm2... are the names of form fields in the called form which will receive the passed values value1, value2... can be either a quoted value or a form field
See also returnfrom form and goto form |
|
|
Description: |
suspends execution of the current form, committing the current transaction, and begins execution of the new form.
This command provides the ability to call another Verj.io form and then return to the calling form using the returnfrom form command. Field values can be passed as parameters to the called form and can also be returned from the called form by setting the "return field" property of the fields on the called form. A return parameter must have the same name in both the calling and called forms.
On return from the called form, normal form processing is resumed from the point where the CALL command was executed. i.e. the FPL command following the CALL will be executed if there is one, or the next script in the event sequence will be executed etc. |
|
|
Examples: |
call form PRODUCT_DETAIL PRODUCT_ID=PRODUCT_ID,NEWITEM='Y';
if [ ..... ] set TARGET_FORM = 'NEWFORM1'; else set TARGET_FORM = 'NEWFORM2'; endif call form TARGET_FORM;
To return: returnfrom form; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
commit;
This command has no operands. |
|
|
Description: |
Commits the current transaction. A new transaction is then started to handle any additional processing. Execution continues with the next FPL statement. See transaction support for more details. |
|
|
Examples: |
commit; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
|
|
|
Description: |
copies the contents of the source table to the target table. Any existing data is removed from the target table prior to the copy. Empty rows in the source table are ignored. Any rows in the source table that have been deleted using the deleterow command are ignored All other rows are copied.
All columns having the same name in each table are copied e.g. if T1 has columns T1-A, T1-B, T1-C, T1-D and T2 has columns T2-B, T2-C, T2-X, T2-Y, a copytable from T1 to T2 will copy columns T1-B to T2-B and T1-C to T2-C. Any other columns in T2 will be set to null or the column’s default value.
The current row of the source table is not effected by the copy operation. The current row of the target table is set to the first row after the copy. |
|
|
Examples: |
copytable T1 to T2; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
delete RESOURCE [ ( component_prefix ) [ BINDING ] ;
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of a database or custom resource, or the name of a form field containing a resource name. BINDING is optional and is applicable only for custom resources |
|
|
Description: |
deletes one or more rows from the database. The generated SQL statement will include the WHERE clause defined in the database resource and this will constrain which row(s) are deleted. Care should be taken to ensure that the appropriate WHERE clause is configured; if no WHERE CLAUSE is configured, all records in the table will be deleted. If any of the resource fields are marked as required but have no value when this command is issued, the form terminates with an appropriate message.
$UPDATE_COUNT contains the number of records deleted |
|
|
Examples: |
delete APPLICATION; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
deleterow; deleterow TABLE ROWID; |
|
TABLE is the name of a table in the form ROWID is the internal row number of a row and can be either an integer literal or a field or table column of type INTEGER (see programming with row numbers for more details)
|
Description: |
deletes a row in a table. When used without any parameters, it deletes the current row in the current table and this form of the command can only be used within a loop at table construct or in a before control, validation or on click table cell event. If the table is backed by an external resource such as a database, the row will be deleted from this resource when a subsequent updatetable command is issued. Note that a table row deleted with the deleterow command is not displayed to the user with the delete flag set, so the user does not have the option to 'undelete'. This is in contrast to deletion requested by the user. |
|
|
Examples: |
loop at table EXPENSES if [ AMOUNT = 0 ] deleterow; endif endloop
deleterow EMPLOYEES ROW_ID_FIELD; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
display expression;
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements), that when resolved is treated as a URL. |
|
|
Description: |
the URL resulting from the evaluation of expression is displayed in a pop-up browser window. This command can be used to pop up another web page or can be used to display any document which can be displayed by the browser, e.g. documents of type doc, xls, pdf, tif, etc. If an external URL is displayed, the full name including the protocol must be specified, (e.g. http://).
Note that this command can be used only when a page of the form is also displayed. For example, it cannot be used in an end of form event or an end of page event for the last page of the form. |
|
|
Examples: |
display 'http://www.google.com'; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
exec RESOURCE [ ( component_prefix ) [ BINDING ] [ NOFAIL ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of a stored procedure or custom resource, or the name of a form field containing a resource name. BINDING is optional and is applicable only for custom resources |
|
NOFAIL is optional; when specified, any errors are returned in $COMMAND_STATUS which should be checked for a value other than ‘OK’. When not specified, errors will result in termination of form execution.
|
Description: |
invokes the stored procedure or function specified by the stored procedure resource. This command is used for all stored procedure resources regardless of their function e.g. input, update, query etc.
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
|
Examples: |
exec CLIENT_CHECK; exec CLIENT_CHECK ( COMP1 ); exec CLIENT_CHECK NOFAIL; if [ $COMMAND_STATUS != 'OK' ] .. endif |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
Other values |
- when the NOFAIL option is used |
Syntax: |
fetch RESOURCE [ ( component_prefix ) ] [ BINDING ] [ NOFAIL ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of a database or custom resource, or the name of a form field containing a resource name. BINDING is optional and is applicable only for custom resources |
|
NOFAIL is optional; when specified, any errors are returned in $COMMAND_STATUS which should be checked for a value other than ‘OK’. When not specified, errors will result in termination of form execution.
|
Description: |
retrieves a single row from the database resource and sets the value of all mapped form fields.
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details.
It is important to realize that this command can only return a single database row to the calling form. If multiple rows are returned by the database, the last row retrieved will be returned to the form. Furthermore, if any of the resource fields are marked as required but have no value when this command is issued, the form terminates with an appropriate message. |
|
|
Examples: |
fetch PRICE_DETAIL;
fetch ORDER ( DELIVERY_ORDER );
fetch USER_RECORDS NOFAIL; if [ $COMMAND_STATUS != 'OK' ] .. endif |
$COMMAND_STATUS: |
OK |
- command executed successfully or command ignored as the WHERE clause is absent |
|
Other values |
- when the NOFAIL option is used |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
Other values |
- when the NOFAIL option is used |
$COMMAND_STATUS: |
OK |
- command executed successfully |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
goto url [ GET | POST ] expression [,parm1=value1, parm2=value2.......];
GET or POST are optional and specify the HTTP method to be used for the call. If omitted, the default is specified in server property Call Url Method.
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements), that when resolved is treated as a URL. If an external URL is called, the full name including the protocol (e.g. http://) must be specified.
parm1, parm2... are the names of form fields in the called form which will receive the passed values value1, value2... can be either a quoted value, a numeric value or a form field
See also call URL which supports calling an external URL and returning to the same form, and display. |
|
|
Description: |
terminates execution of the current form, committing the current transaction, and passes control to the specified URL. The form memory is freed, and return to the Verj.io form is not possible. Navigation back to the form using the browser back button is not possible.
If the URL represented by expression might contain parameters which are not valid within a URL e.g. whitespace, ?, & etc, then these should be escaped using the urlencode function. Note that values passed as parameters value1, value2 etc should not be escaped as this is done automatically by the system.
|
|
|
Examples: |
goto url 'homepage.html'; goto url post 'http://uk.box.mail.com/ShowFolder', name=F1, status='OK'; goto url 'http://uk.box.mail.com/ShowFolder?name=' + F1 + '&status=OK'; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
hide BUTTON_NEXTPAGE [ on PAGENAME]; hide BUTTON_PREVIOUSPAGE [ on PAGENAME]; hide BUTTON_FINISH; hide BUTTON_SAVE; hide BUTTON_RESTORE;
PAGENAME is the name of the page containing the button
BUTTON_NEXTPAGE is the next page button BUTTON_PREVIOUSPAGE is the previous page button BUTTON_FINISH is the finish button BUTTON_SAVE is the save button BUTTON_RESTORE is the restore button
if on PAGENAME is omitted, the current page is processed |
|
|
Description: |
the specified button will not appear on the page. These commands affect the visibility of the built-in page sequencing and save/restore buttons when these buttons are included on a page using a Legacy Button Control or one of the specific paging or save/restore Button Controls. These commands override the system default processing for the display of these buttons. For the finish, save and restore buttons, the command will apply to the current page and all subsequent pages. For the next page and previous page buttons, the command applies only to the specified page.
See Page Sequencing for more information on the built-in page sequencing buttons. See Save/Restore for more information on the save/restore feature.
This command is equivalent to command set BUTTONNAME [ on PAGENAME] HIDDEN. |
|
|
Examples: |
hide BUTTON_PREVIOUSPAGE HIDDEN; hide BUTTON_PREVIOUSPAGE on Page_2 HIDDEN; hide BUTTON_SAVE HIDDEN; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
hide column COLUMNNAME [ in ] table TABLENAME [ on PAGENAME];
COLUMNNAME is the full name of any column in the table including the table prefix e.g. MYTAB-NAME TABLENAME is the name of the table PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the table is assumed to be on the current page |
|
|
Description: |
makes the specified table column invisible. This command is equivalent to: set column COLUMNNAME [ in ] TABLENAME [ on PAGENAME] HIDDEN
This command cannot be issued from a table cell event or within a loop at table construct.
(see show column command for the reverse process) |
|
|
Examples: |
hide column EMPLOYEES-SALARY in table EMPLOYEES; hide column SALES-VAT table SALES on DETAILS; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
hide CONTROLNAME [ on PAGENAME];
CONTROLNAME is the name of the control PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the control is assumed to be on the current page |
|
|
Description: |
hides the specified control and all its children. Note that a control is considered to be hidden if the control itself or any of its parents are hidden.
(see show control command for the reverse process) |
|
|
Examples: |
hide FIELDCONTROL1; hide ORDERS_PANEL on P12; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
hide FIELDNAME [ : id ] ] [ [ in ] table TABLENAME ] [ on PAGENAME];
FIELDNAME is the name of any field in the form PAGENAME is the name of the page containing the field Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used.
if on PAGENAME is omitted, the field is assumed to be on the current page in table TABLENAME can be omitted where a table context exists e.g. inside a loop at table construct. |
|
|
Description: |
makes the specified field invisible on the specified page. If the specified field is a table cell, the command results in the contents of the cell being hidden. This command performs the same function as command: set FIELDNAME [ on PAGENAME] HIDDEN
If FIELDNAME is not found, the command is processed as hide control.
(see the show command for the reverse process) |
|
|
Examples: |
hide FIELD_1; hide FIELD_2 on LAST_PAGE; hide DUPLICATED_FIELD : 120; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
This command is deprecated from Version 4.0, use hide control command instead. The command is supported only for forms upgraded from Ebase Version 3.
Syntax: |
hide group GROUPNAME [ on PAGENAME];
GROUPNAME is the name of any group on the specified page PAGENAME is the name of the page containing the group
if on PAGENAME is omitted, the group is assumed to be on the current page |
|
|
Description: |
makes all fields in the specified group invisible on the specified page. This command performs the same function as command: set group GROUPNAME [ on PAGENAME] HIDDEN
(see the show group command for the reverse process) |
|
|
Examples: |
hide group G1; hide group G2 on PAGE_9; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
highlight FIELDCONTROLNAME [ on PAGENAME ] CLASS; highlight FIELD FIELDNAME [ : id ] [ on PAGENAME ] CLASS; highlight ROW CLASS; highlight ROW TABLE ROWID CLASS; highlight TABLECELL COLUMNNAME CLASS;
FIELDCONTROLNAME is the name of a Field Control; note that this command cannot be used with other controls. The command is assumed to be of the type highlight FIELDCONTROLNAME if the second word is not FIELD, ROW or TABLECELL. FIELDNAME is the name of any field in the form. PAGENAME is the name of the page containing the control or field. If omitted, the control or field is assumed to be on the current page. Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used. COLUMNNAME is the name of any column in the current table. TABLE is the name of a table in the form. ROWID is the internal row number of a row and can be either an integer literal or a field or table column of type INTEGER (see programming with row numbers for more details). CLASS is the name of a CSS class to be applied. This can be any class available in an associated style sheet. |
|
|
Description: |
applies the specified CSS class to the specified field control, field, table row or individual table cell. The highlight tablecell and highlight row (with no parameters) commands are interpreted as applying to the current row of the current table and can only be issued when a table context applies i.e. within a loop at table....endloop construct or when processing a before control, validation or on click event for a table or table cell. The unhighlight command can be used to remove a highlighting class. |
|
|
Examples: |
highlight FIELDCONTROL1 errorstyle; highlight field FIELD_1 WARNING; highlight field FIELD_2 on LAST_PAGE WARNING; highlight field DUPLICATED_FIELD : 120 ALERT; highlight row RED; highlight row ORDERS ROW_ID_FIELD RED; highlight tablecell T-COL1 BOLD; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
if [ expression ] commands; else commands; endif |
|
|
expression is any expression that returns true or false (see assignment statements)
|
|
|
· The else clause is optional · Each if statement must be terminated by an endif · Any number of commands can be inserted into the if and else clauses · if statements can be nested to any level |
|
|
Description: |
basic statement for programmed branch logic |
|
|
Examples: |
if [ SELECTION = 'NEW' ] command1; command2; else command3; endif |
$COMMAND_STATUS: |
Not applicable |
Syntax: |
insert RESOURCE [ ( component_prefix ) [ BINDING ];
RESOURCE is the name of a database or custom resource, or the name of a form field containing a resource name. BINDING is optional and is applicable only for custom resources |
|
|
Description: |
inserts a single row into the database. Column values are assigned from the mapped form fields. If any of the resource fields are marked as required but have no value when this command is issued, the form terminates with an appropriate message.
$UPDATE_COUNT contains the number of records inserted |
|
|
Examples: |
insert APPLICATION;
sequence APPLICATIONS; set APPLICATION_ID = $NEXT_SEQUENCE_ID; insert APPLICATION; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
insertrow TABLE [ EMPTY ];
EMPTY indicates that the new row should be treated as empty until the user inserts data into at least one field. Empty rows are ignored by the updatetable command. |
|
|
Description: |
inserts a new row into the named table. The fields in the row are initialized with their default values or null as appropriate. Issuing an insertrow command results in the currrent row pointer for the table being set to the inserted row. Inserted rows are displayed at the bottom of the table. |
|
|
Examples: |
insertrow EXPENSES; // set initial values for the first row set EXPENSES-START_DATE = $SYSTEM_DATE; set EXPENSES-DESCRIPTION = 'First empty row'; insertrow EXPENSES; // set initial values for the second row set EXPENSES-START_DATE = $SYSTEM_DATE; set EXPENSES-DESCRIPTION = 'Second empty row'; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
interpret expression;
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements). |
|
|
Description: |
expression is evaluated and then executed as an FPL script command. |
|
|
Restrictions: |
Can be used to execute all FPL commands with the exception of: if, else, loop, endloop, callscript, interpret. |
|
|
Examples: |
// issue hide command set CONTROL_NAME = 'GROUPPANEL1'; interpret 'hide ' + GROUP_NAME;
// issue message command set MSG_ID = 'Msg100'; interpret 'message E, ' + MSG_ID;
|
$COMMAND_STATUS: |
$COMMAND_STATUS is set by the FPL command evaluated. |
Syntax: |
lock resource name, id;
resource name is the name of the resource to be locked id is the unique identifier within the resource |
|
|
Description: |
locks the specified resource id so that it cannot be accessed by another user. An unlock command should be issued when the resource is no longer required. The system will automatically release all held locks at the end of each form execution. (See Support for transactions for more information) |
|
|
Examples: |
// Lock material specified by field MATERIAL_ID lock 'MATERIAL', MATERIAL_ID; if [ $COMMAND_STATUS = 'ERROR' ] message E, Msg2; endif |
$COMMAND_STATUS: |
OK |
- lock has been acquired |
|
ERROR |
- the lock is held by another user |
Syntax: |
log expression;
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements). |
|
|
Description: |
writes the evaluated expression to the execution log viewable from the studio Viewà Execution Log. This command is intended for use in debugging. |
|
|
Examples: |
log FIELD2; log 'FIELD2 has the value: ' + FIELD2; log 'Integer value is: ' + tostring(INTEGER_FIELD); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
loop [ expression ] commands; endloop
expression is any expression that returns true or false (see assignment statements).
· Each loop statement must be terminated by an endloop · Loops can be nested to any level · The break statement can be used to terminate execution of a loop · To protect against infinite loops, the system has a maximum loop counter which can be set using server property FPL Max Loop Count. The default value for this counter is 10,000. |
|
|
Description: |
the loop expression is evaluated before the statements within loop/endloop are executed. If the expression evaluates as true the statements are executed. This processing is repeated until either the loop expression evaluates as false or a break statement is encountered. |
|
|
Examples: |
set COUNTER = 1; loop [ COUNTER <= 10 ] log 'This is loop pass: ' + tostring(COUNTER); .....other commands set COUNTER = COUNTER + 1; endloop |
$COMMAND_STATUS: |
Not applicable |
|
Syntax: |
loop at [TABLE] table_name commands; endloop
table_name is the name of a table
· Each loop statement must be terminated by an endloop · Loops can be nested to any level · The break statement can be used to terminate execution of a loop. The current row of the table remains set to the row at the point break is issued. |
|
|
Description: |
loops through all rows of the named table refreshing the current row pointer with each new pass through the loop. References to a table column within the loop are interpreted as referring to the occurrence of the column on the current row. Processing is repeated until either all tables have been processed or a break statement is encountered.
|
|
|
Examples: |
loop at table ORDER_ITEMS set ORDER_TOTAL = ORDER_TOTAL + ORDER_ITEMS-AMOUNT; endloop
ORDER_ITEMS-AMOUNT is a table column, ORDER_TOTAL is a field not included in the table) |
$COMMAND_STATUS: |
Not applicable |
|
Syntax 1: Syntax 2: |
message type, textId [,parm1, parm2, parm3 ......]; message 'text';
type can have three possible values : textId is the id of the text containing the message parm1, parm2 etc. represent up to ten form fields whose value will be substituted into the message text is the message text for a simple message
A substitutable field within a message is indicated by &&. Up to ten substitutable fields can be added to each message. |
|
|
Description: |
sends a message to the end user.
Error messages: can be issued from all events other than form-level events. When an error message is issued from a validation event or any type of immediate event (e.g. on click, after page), form processing will immediately stop, and the page will be displayed to the user so the error can be corrected. When an error message is issued from a before event, processing will continue. See event concepts for more information.
Warning and info messages: can be issued from all events other than form-level events. In contrast to error messages, these messages do not stop form processing and any number of warning or info messages can be displayed on a page.
Final page messages: will only be displayed on the form's final page after form processing has completed. These can be issued at any time during form processing. All final messages, issued during the entire form session, will appear in the order they were issued.
The simple syntax displays an error message to the end user. This syntax does not provide support for multiple languages, substitution of form field variables into the message, or warning or final messages. |
|
|
Examples: |
message E, Msg25, LOAN_AMOUNT; where:
message sent : Requested loan amount £15000 is below the minimum of £30000
message W, WarningMessage99;
message F, M123, 'Thankyou for using online voting'; where text M123 contains : &&
message 'No credit available at this time'; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
OUTPUTPAGE [AS PDF] [SAVE <FILE LOCATION>] [NODISPLAY] [POPUP <TARGET_WINDOW>| INLINE] [REPORT] [ALL | PAGE_NAME_LIST]
All operands within [] are optional.
If no operands are specified, the current page will be printed in a popup
window.
|
||||||||||||||||
|
|
||||||||||||||||
Description: |
Generates (and optionally saves) a PDF document from a list of specified pages of the form and displays this to the user in a popup window. See printing for details of using this command. |
||||||||||||||||
|
|
||||||||||||||||
Examples: |
//outputs current form name as a PDF in a popup window OUTPUTPAGE;
//outputs MY_PDF_PAGE of the form as a PDF in a popup window and saves the document to c:/temp/mypdf.pdf OUTPUTPAGE save 'c:/temp/mypdf.pdf' MY_PDF_PAGE;
//outputs outputs MY_PDF_PAGE_1 and MY_PDF_PAGE_2 of the form as a PDF in a popup window OUTPUTPAGE MY_PDF_PAGE_1, MY_PDF_PAGE_2;
//outputs all pages of a form as a pdf but not in a popup window OUTPUTPAGE INLINE ALL; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
PDFPrint [ PRINTFORMNAME ] [ save ] [ empty ] [ nodisplay ];
PRINTFORMNAME is the name of the print form to be displayed. If omitted, the default print form for the form being executed is displayed. Please note that PRINTFORMNAME is case sensitive.
save instructs the system to additionally save the completed document on the server. See working with files for more information. empty instructs the system to just generate a PDF document and not populate it with data from the form nodisplay instructs the system to suppress the display of the PDF document. This should only be used in conjunction with save. |
|
|
Description: |
Generates (and optionally saves) a PDF form document and displays this to the user in a popup window. See printing for details of using this command. |
|
|
Examples: |
PDFPrint PF1; PDFPrint PF2 save nodisplay; PDFPrint PF3 empty; PDFPrint; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
print PRINT_RESOURCE [ ( component_prefix ) [ and save [ nodisplay ] ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. PRINT_RESOURCE is the name of a printing resource, or the name of a form field containing a resource name. and save instructs the system to additionally save the completed document on the server. See working with files for more information. nodisplay instructs the system to suppress the display of the print document. This can only be specified in conjunction with save. |
|
|
Description: |
displays the print document specified in the printing resource and transfers all mapped fields from the form to the document. see working with printing resources.
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
|
Examples: |
print APPLICATIONS_PDF; print APPLICATIONS_PDF and save; print APPLICATIONS_PDF and save nodisplay; print PDF1 ( COMP1 ); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
read RESOURCE [ ( component_prefix ) [ BINDING ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of an XML resource, MQ resource, or custom resource, or the name of a form field containing a resource name BINDING is optional |
|
|
Description: |
XML resources: reads an XML document via the resource using the adaptor specified by BINDING (or the default adaptor if BINDING is not specified) and populates all mapped form fields. See working with XML resources.
MQ resources: reads a message from the MQSeries queue identified by the named MQ resource and populates all mapped form fields. See working with MQ resources.
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
|
Examples: |
read MY_SOURCE; read XML1 ( COMP1 ); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
READ_ERROR |
- a read was issued but the operation failed (MQ only) |
|
EMPTY |
- queue is empty (MQ only) |
Syntax: |
return;
This command has no operands. |
|
|
This command is typically used in conjunction with the callscript command to return processing control from the current script to the script that called it. If there is no calling script then the return command will exit the current script at that point where the return is issued. |
|
|
|
Examples: |
return; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
resettable TABLE; |
|
|
Description: |
This command clears the entire contents of the table and resets the current row. Note that this command will not result in the deletion of records from a backing resource specified for the table e.g. a Database Resource; any subsequent updatetable command will not remove these rows from the attached resource. To remove all rows from the table and the backing resource use: loop
at T1 deleterow; endloop updatetable T1; |
|
|
Examples: |
resettable T1; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
returnfrom form;
|
|
|
Description: |
This command should only be used in conjunction with the call form command and is used to return from the called form to the calling form. Any fields on the called form marked as "returnable" will be returned to the calling form. Please note that return fields must have the same name in both the calling and called forms. |
|
|
Examples: |
returnfrom form; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
rollback;
This command has no operands. |
|
|
Description: |
Rolls back the current transaction, backing out any updates. A new transaction is then started to handle any additional processing. Execution continues with the next FPL statement. See transaction support for more details. |
|
|
Examples: |
if [ $COMMAND_STATUS != 'OK' ] rollback; message E, M456; endif |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
script ( parm1type parm1name, parm2type parm2name,…)
parmntype parmnname specify the type and name of the script
in parameters ·
parmntype can be TABLE or any local variable type · parmnname can be any name |
|
|
Description: |
This statement specifies the parameters passed into the script from a calling script. The statement is optional, but if it appears it must be the first statement in a script. See calling scripts with FPL for more information. See also callscript. |
|
|
Examples: |
script(char c1, int
i1, date d1) script(table tab1) script() |
Syntax: |
sendmail RESOURCE [ ( component_prefix ) [ with attachments expression1, expression2, ...];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of an email resource, or the name of a form field containing a resource name expression1, expression2 etc are either names of form fields, system variables or literal values containing the full path to a file to be added as an attachment to the email message |
|
|
Description: |
sends the email message as specified in the email resource. Any substitutable fields in the email will be filled with values from the mapped form fields. See working with email resources.
The optional [ with attachments expression1, expression2, ...] can be added to attach files to the message. See working with files for a more complete description of sending emails with attachments. Note that if the sendmail command fails for any reason e.g. the email server is unavailable, the behaviour of the system depends on the setting of the checkbox “setting of this email is critical” in the email resource:
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
|
Examples: |
sendmail NOTIFICATION_MESSAGE; sendmail NOTIFICATION_MESSAGE with attachments $FILE_NAME; sendmail NOTIFICATION_MESSAGE with attachments ‘file1.xml’, ‘file2.doc’; sendmail MESSAGE1 ( COMP1 ); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
ERROR |
- command has failed (see explanation under Description) |
Syntax: |
sequence SEQUENCENAME;
|
|
|
Description: |
The specified sequence is incremented and the next number is placed in system variable $NEXT_SEQUENCE_ID. See working with sequences. |
|
|
Examples: |
sequence APPLICATIONS; set APPLICATION_ID = $NEXT_SEQUENCE_ID; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set BUTTON_NEXTPAGE [ on PAGENAME] HIDDEN; set BUTTON_PREVIOUSPAGE [ on PAGENAME] HIDDEN; set BUTTON_FINISH HIDDEN; set BUTTON_RESTORE HIDDEN;
PAGENAME is the name of the page containing the button
BUTTON_NEXTPAGE is the next page button BUTTON_PREVIOUSPAGE is the previous page button BUTTON_FINISH is the finish button BUTTON_SAVE is the save button BUTTON_RESTORE is the restore button
if on PAGENAME is omitted, the current page is processed |
|
|
Description: |
the specified button will not appear on the page. These commands affect the visibility of the built-in page sequencing and save/restore buttons when these buttons are included on a page using a Legacy Button Control or one of the specific paging or save/restore Button Controls. These commands override the system default processing for the display of these buttons. For the finish, save and restore buttons, the command will apply to the current page and all subsequent pages. For the next page and previous page buttons, the command applies only to the specified page.
See Page Sequencing for more information on the built-in page sequencing buttons. See Save/Restore for more information on the save/restore feature.
(see the UNSET command for the reverse process) |
|
|
Examples: |
set BUTTON_ PREVIOUSPAGE HIDDEN; set BUTTON_ PREVIOUSPAGE on Page_2 HIDDEN; set BUTTON_ SAVE HIDDEN; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set BUTTON_NEXTPAGE [ on PAGENAME] = expression; set BUTTON_PREVIOUSPAGE [ on PAGENAME] = expression; set BUTTON_FINISH = expression; set BUTTON_SAVE = expression set BUTTON_RESTORE = expression;
expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements).
BUTTON_NEXTPAGE is the next page button BUTTON_PREVIOUSPAGE is the previous page button BUTTON_FINISH is the finish button BUTTON_SAVE is the save button BUTTON_RESTORE is the restore button
if on PAGENAME is omitted, the current page is processed |
|
|
Description: |
assigns a text value to the specified system-provided button. It cannot be used for other buttons. |
|
|
Examples: |
set BUTTON_NEXTPAGE = 'Accept conditions'; set BUTTON_FINISH = 'Submit application'; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set column COLUMNNAME in table TABLENAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY;
COLUMNNAME is the field name of any column in the table including the table prefix e.g. MYTAB-NAME TABLENAME is the name of the table PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the field is assumed to be on the current page |
|
|
Description: |
changes the display attributes for the specified column on all rows of the specified table on the specified page
DISPLAYONLY - data cannot be entered by the user. Dropdown lists, radio buttons and checkboxes will display the selected value as a text field. HIDDEN - column will not appear in the table MANDATORY - table cells are treated as mandatory and must be entered by the user on every row
This command cannot be issued from a table cell event or within a loop at table construct.
(see the unset column command for the reverse process) |
|
|
Examples: |
set column EMPLOYEES-SALARY in table EMPLOYEES HIDDEN; set column EXPENSES-VAT in table EXPENSES on PAGE_1 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
[ set ] CONTROLNAME.propertyName = expression;
CONTROLNAME is the name of any control in the form and can be specified in any case. propertyName is the name of a property and is case sensitive. expression can be a literal value, a local variable, a form field, a table column, an arithmetic expression, a function call, or any combination of these (see assignment statements).
See also Accessing Control Properties from FPL.
Note that the set verb is optional and can be omitted, in which case this is an assignment statement. |
||
|
|
||
Description: |
Sets a value for the specified property. Property names and types (Character/Boolean/Integer) are provided in the documentation for each control. Nearly all control properties can be set using this command. See also Accessing Control Properties from FPL. |
||
|
|
||
Examples: |
set panel1.width = '1000px'; panel1.textBold = 'Bold'; PANEL1.backgroundColor = '#FFFFCC'; set PANEL1.style = 'border-radius:10px;-moz-border-radius:10px;';
|
||
|
|
||
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
|
|
|
|
Syntax: |
set CONTROLNAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY | HYPERLINK;
CONTROLNAME is the name of the control PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the control is assumed to be on the current page |
||||||||
|
|
||||||||
Description: |
changes the display attributes for the specified control on the specified page.
(see the unset command for the reverse process)
|
||||||||
Examples: |
set FIELDCONTROL_1 HIDDEN; set FIELDCONTROL_2 on LAST_PAGE DISPLAYONLY; set FIELDCONTROL_3 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
[ set ] VARIABLENAME = expression;
VARIABLENAME is the name of any local variable, form field or table column. Variable names can be specified in any case. expression can be a literal value, a local variable, a form field, a table column, an arithmetic expression, a function call, or any combination of these (see assignment statements). |
|
Note that the set verb is optional and can be omitted, in which case this is an assignment statement.
|
Description: |
assign a value to a variable |
|
|
Examples: |
set FIELD_1 = 'Hello'; set field_2 = FIELD_1; set FIELD_3 = FIELD_1 + ' and ' + FIELD_2; FIELD_4 = substring(FIELD_1, 3); DELIVERY_DATE = $SYSTEM_DATE + 10; FINAL_AMOUNT = LOAN_AMOUNT + (LOAN_AMOUNT * (INTEREST_RATE / 100) * PERIOD_OF_LOAN ); |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set FIELDNAME [ : id ] [ [ in ] table TABLENAME ] [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY | HYPERLINK;
FIELDNAME is the name of any field in the form TABLENAME is the name of the table containing column FIELDNAME PAGENAME is the name of the page containing the field Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used.
if on PAGENAME is omitted, the field is assumed to be on the current page in table TABLENAME can be omitted where a table context exists e.g. inside a loop at table construct. |
||||||||
|
|
||||||||
Description: |
changes the display attributes for the specified field on the specified page. If the specified field is a table cell, the command is applied to the current row of the containing table.
If FIELDNAME is not found, the command is processed as the corresponding set control command.
(see the unset command for the reverse process)
|
||||||||
Examples: |
set FIELD_1 HIDDEN; set FIELD_2 on LAST_PAGE DISPLAYONLY; set FIELD_£ MANDATORY; set DUPLICATED_FIELD : 70 DISPLAYONLY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
This command is deprecated from Version 4.0, use corresponding set control command instead. The command is supported only for forms upgraded from Ebase Version 3.
Syntax: |
set group GROUPNAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY;
GROUPNAME is the name of any group on the specified page PAGENAME is the name of the page containing the group
if on PAGENAME is omitted, the group is assumed to be on the current page |
||||||
|
|
||||||
Description: |
changes the display attributes for all fields in the specified group on the specified page
(see the unset command for the reverse process) |
||||||
|
|
||||||
Examples: |
set group SALARY HIDDEN; set group ADDRESS on PAGE_3 DISPLAYONLY; set group G1 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set JSP_TOP = expression; set JSP_BOTTOM = expression; set JSP_LEFT = expression; set JSP_RIGHT = expression;
expression can be a literal value, a form field, an arithmetic expression, a function call, or any combination of these (see assignment statements). The word null indicates that no JSP should be applied. |
|
|
Description: |
sets the URL of the corresponding JSP used on the current page and all subsequent pages. This specification will be used until another set JSP command is executed or until the form ends. |
|
|
Examples: |
set JSP_TOP = 'salesproj/jsps/top_panel.jsp'; set JSP_LEFT = null; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set nextpage PAGENAME;
PAGENAME is the name of the next page |
|
|
Description: |
sets the next page to be displayed when the user clicks a next page button. See Page Sequencing. |
|
|
Examples: |
set nextpage PRODUCT_DETAIL; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set table [ ON PAGENAME ] TABLENAME.PROPERTYNAME = expression; PAGENAME the name of the page containing the table TABLENAME is the name of the table. PROPERTYNAME is the name of the property to be set expression can be a literal value, another form field, an arithmetic expression, a function call, or any combination of these (see assignment statements). |
|||||||||||||||||||||
|
|
|||||||||||||||||||||
Description: |
sets a property on the specified table. The following table shows the supported properties and supported property values:
When the numrows property is set, the scroll position is reset to the top of the table.
Note that these properties (and many additional table properties) can also be set using the set control property command against the appropriate Table Control.
See also field and table properties. |
|||||||||||||||||||||
|
|
|||||||||||||||||||||
Examples: |
set table ACCOUNTS.numrows = 10; set table ADDRESSES.columnHeaders = false; set table ACCOUNTS.displayInfo = false; set table on PAGE_5 ACCOUNTS.supportsAddRow = true; set table ACCOUNTS:310.supportsSelectRow = false; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set template templateid; set template $NULL;
templateid is the name of the new presentation template to be applied to the form. |
|
|
Description: |
changes the presentation template. The presentation template is located by searching all directories in all linked projects starting with the project of the owning form, the first template with the requested name is used.
set template $NULL removes the presentation template styling at runtime. This will result in the all the style being removed from the form at runtime. Some controls may have basic system defaults applied. |
|
|
Examples: |
set template NEW_TEMPLATE; set template $NULL; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
set text textid1 = 'text'; set text textid1 = textid2;
textid1, textid2 are text ids 'text' is a text string enclosed within single quotes |
|
|
Description: |
changes a text to be displayed to either a literal value or to another form text value. This is a temporary change and lasts only to the end of the form. Note that control texts can also be set using the set control property command. See Working With Texts for further details. |
|
|
Examples: |
set text TXT101 = 'Your answer is not clear - please provide additional details'; set text TXT99 = TXT1234; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
setfocus CONTROLNAME [ on PAGENAME ] [ ERROR ]; setfocus FIELDNAME [ : id ] [ [ in ] table TABLENAME ] [ on PAGENAME ] [ ERROR ]; setfocus $NULL [ on PAGENAME ];
CONTROLNAME is the name of the control FIELDNAME is the name of any field in the form PAGENAME is the name of the page containing the field TABLENAME is the name of the table containing FIELDNAME ERROR indicates that error formatting should be applied Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used.
If on PAGENAME is omitted, the control or field is assumed to be on the current page If ERROR is not specified, standard formatting is applied in table TABLENAME can be omitted when setting focus to a table column where a table context exists e.g. inside a loop at table construct. |
|
|
Description: |
sets the focus to the specified control, field or table cell. If the specified field is a table cell, the command is applied to the current row of the containing table. setfocus $NULL indicates that all focus should be suppressed for the next display of the specified page. See controlling focus for further details.
The command looks first for a field named FIELDNAME; if this is not found, it then treats the command as setfocus CONTROLNAME. |
|
|
Examples: |
setfocus CUSTOMER_NAME; setfocus CUSTOMER_NAME ERROR; setfocus ORDER-AMOUNT table ORDERS; setfocus ORDER-AMOUNT in table ORDERS on PAGE_9; setfocus $NULL; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
setrow SELECTED | DELETED | EMPTY; |
|
|
changes the status of the current row in the current table to either selected, deleted or empty and sets the corresponding system variable $ROW_SELECTED, $ROW_DELETED or $ROW_EMPTY. This command can be reversed using the unsetrow command. |
|
|
|
Examples: |
loop at table ACCOUNTS if [ ACCOUNT_NO = null ] setrow empty; endif endloop |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
show BUTTON_NEXTPAGE [ on PAGENAME ]; show BUTTON_ PREVIOUSPAGE [ on PAGENAME]; show BUTTON_ FINISH; show BUTTON_ SAVE; show BUTTON_ RESTORE;
PAGENAME is the name of the page containing the button
BUTTON_NEXTPAGE is the next page button BUTTON_PREVIOUSPAGE is the previous page button BUTTON_FINISH is the finish button BUTTON_SAVE is the save button BUTTON_RESTORE is the restore button
if on PAGENAME is omitted, the current page is processed |
|
|
Description: |
the specified button will be shown on the page. These commands affect the visibility of the built-in page sequencing and save/restore buttons when these buttons are included on a page using a Legacy Button Control or one of the specific paging or save/restore Button Controls. These commands override the system default processing for the display of these buttons. For the finish, save and restore buttons, the command will apply to the current page and all subsequent pages. For the next page and previous page buttons, the command applies only to the specified page.
See Page Sequencing for more information on the built-in page sequencing buttons. See Save/Restore for more information on the save/restore feature.
This command is synonymous with command unset BUTTONNAME [ on PAGENAME] HIDDEN.
(see the HIDE command for the reverse process) |
|
|
Examples: |
show BUTTON_ PREVIOUSPAGE HIDDEN; show BUTTON_ PREVIOUSPAGE on Page_2 HIDDEN; show BUTTON_ SAVE HIDDEN; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
show column COLUMNNAME [ in ] table TABLENAME [ on PAGENAME];
COLUMNNAME is the name of any column in the table including the table prefix e.g. MYTAB-NAME TABLENAME is the name of the table PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the table is assumed to be on the current page |
|
|
Description: |
makes the specified table column visible on the specified page. This command performs the same function as command: unset column COLUMNNAME [ in ] TABLENAME [ on PAGENAME] HIDDEN
(see hide column command for the reverse process) |
|
|
Examples: |
show column EMPLOYEES-SALARY in table EMPLOYEES; show column EMPLOYEES-VAT table EMPLOYEES on DETAILS; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
show CONTROLNAME [ on PAGENAME];
CONTROLNAME is the name of the control PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the control is assumed to be on the current page |
|
|
Description: |
makes the specified control visible. Note that a control is considered to be hidden if the control itself or any of its parents are hidden.
(see hide control command for the reverse process) |
|
|
Examples: |
show FIELDCONTROL1; show ORDERS_PANEL on P12; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
show FIELDNAME [ : id ] [ [ in ] table TABLENAME ] [ on PAGENAME];
FIELDNAME is the name of any field in the form TABLENAME is the name of the table containing FIELDNAME PAGENAME is the name of the page containing the field Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used.
if on PAGENAME is omitted, the field is assumed to be on the current page in table TABLENAME can be omitted where a table context exists e.g. inside a loop at table construct. |
|
|
Description: |
makes the specified field visible on the specified page. If the specified field is a table cell, the command is applied to the current row of the containing table. This command performs the same function as command: unset FIELDNAME [ on PAGENAME] HIDDEN
If FIELDNAME is not found, the command is processed as show control
(see hide command for the reverse process) |
|
|
Examples: |
show FIELD_1; show FIELD_2 on LAST_PAGE; show FIELD_2 in table ACCOUNTS; show DUPLICATED_FIELD : 70; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
This command is deprecated from Version 4.0, use show control command instead. The command is supported only for forms upgraded from Ebase Version 3.
Syntax: |
show group GROUPNAME [ on PAGENAME];
GROUPNAME is the name of any group on the specified page PAGENAME is the name of the page containing the group
if on PAGENAME is omitted, the group is assumed to be on the current page |
|
|
Description: |
makes all fields in the specified group visible on the specified page. This command performs the same function as command: unset group GROUPNAME [ on PAGENAME] HIDDEN
(see the HIDE GROUP command for the reverse process) |
|
|
Examples: |
show group G1; show group G2 on PAGE_9; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
sort TABLENAME [ by ] COL1 [ ASCENDING | ASC | DESCENDING | DESC ], [ COL2 [ ASCENDING | ASC | DESCENDING | DESC ] ]......;
TABLENAME is the name of the table to be sorted CO1, COL2… are the names of any columns in the table including the table prefix e.g. MYTAB-NAME ASCENDING is the default sort direction if not specified. |
|
|
Description: |
sorts the table in the order of the specified columns and sets the current row for the table to the first row in the newly sorted order |
|
|
Examples: |
sort CUSTOMER by CUSTOMER-NAME; sort CUSTOMER by CUSTOMER-TOTAL_OWED DESCENDING; sort EXPENSES by EXPENSES-TYPE, EXPENSES-AMOUNT DESC; sort MYTAB MYTAB-COL1 ASCENDING, MYTAB-COL2 DESCENDING, MYTAB-COL3, MYTAB-COL4 ASCENDING; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unhighlight FIELDCONTROLNAME [ on PAGENAME ]; unhighlight FIELD FIELDNAME [ : id ] [ on PAGENAME ]; unhighlight ROW; unhighlight ROW TABLE ROWID; unhighlight TABLECELL COLUMNNAME; unhighlight ALL;
FIELDCONTROLNAME is the name of a Field Control; note that this command cannot be used with other controls. The command is assumed to be of the type unhighlight FIELDCONTROLNAME if the second word is not FIELD, ROW or TABLECELL or ALL. FIELDNAME is the name of any field in the form PAGENAME is the name of the page containing the field. If omitted, the field is assumed to be on the current page Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used. COLUMNNAME is the name of any column in the current table. TABLE is the name of a table in the form. ROWID is the internal row number of a row and can be either an integer literal or a field or table column of type INTEGER (see programming with row numbers for more details). ALL indicates that all highlighting is removed from the current page. |
|
|
Description: |
removes any highlighting class from the specified control, field, table row or individual table cell. The unhighlight tablecell and unhighlight row (with no parameters) commands are interpreted as applying to the current row of the current table and can only be issued when a table context applies i.e. within a loop at table....endloop construct or when processing a before control, validation or on click event for a table or table cell. This command reverses the effect of the highlight command. |
|
|
Examples: |
unhighlight FIELDCONTROL1; unhighlight field FIELD_1; unhighlight field FIELD_2 on LAST_PAGE; unhighlight field DUPLICATED_FIELD : 120; unhighlight row; unhighlight tablecell T-COL1 unhighlight all; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unlock RESOURCENAME, id;
RESOURCENAME name is the name of the resource to be unlocked id is the unique identifier within the resource |
|
|
Description: |
unlocks the specified resource id so that it can now be accessed by another user. This is the reverse of the lock command. Note that the system will automatically release all held locks at the end of each form execution. See Support for transactions for more information. |
|
|
Examples: |
unlock 'MATERIAL', MATERIAL_ID (where MATERIAL_ID is a form field) |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unset BUTTON_NEXTPAGE [ on PAGENAME] HIDDEN; unset BUTTON_ PREVIOUSPAGE [ on PAGENAME] HIDDEN; unset BUTTON_ FINISH HIDDEN; unset BUTTON_ SAVE HIDDEN;
PAGENAME is the name of the page containing the button
BUTTON_NEXTPAGE is the next page button BUTTON_PREVIOUSPAGE is the previous page button BUTTON_FINISH is the finish button BUTTON_SAVE is the save button BUTTON_RESTORE is the restore button
if on PAGENAME is omitted, the current page is processed |
|
|
Description: |
the specified button will be shown on the page. These commands affect the visibility of the built-in page sequencing and save/restore buttons when these buttons are included on a page using a Legacy Button Control or one of the specific paging or save/restore Button Controls. These commands override the system default processing for the display of these buttons. For the finish, save and restore buttons, the command will apply to the current page and all subsequent pages. For the next page and previous page buttons, the command applies only to the specified page.
See Page Sequencing for more information on the built-in page sequencing buttons. See Save/Restore for more information on the save/restore feature.
(see the SET command for the reverse process) |
|
|
Examples: |
unset BUTTON_ PREVIOUSPAGE HIDDEN; unset BUTTON_ PREVIOUSPAGE on Page_2 HIDDEN; unset BUTTON_ SAVE HIDDEN; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unset column COLUMNNAME in table TABLENAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY;
COLUMNNAME is the field name of any column in the table including the table prefix e.g. MYTAB-NAME TABLENAME is the name of the table PAGENAME is the name of the page containing the table if on PAGENAME is omitted, the field is assumed to be on the current page |
|
|
Description: |
changes the display attributes for the specified column on all rows of the specified table on the specified page
DISPLAYONLY - data can be entered by the user HIDDEN - column will appear in the table MANDATORY - table cells are treated as optional
This command cannot be issued from a table cell event or within a loop at table construct.
(see the set column command for the reverse process) |
|
|
Examples: |
unset column EMPLOYEES-SALARY in table EMPLOYEES HIDDEN; unset column EXPENSES-VAT in table EXPENSES on PAGE_1 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unset CONTROLNAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY | HYPERLINK;
CONTROLNAME is the name of the control PAGENAME is the name of the page containing the table
if on PAGENAME is omitted, the control is assumed to be on the current page |
||||||||
|
|
||||||||
Description: |
changes the display attributes for the specified control on the specified page and is the reverse of the corresponding set command.
(see the set command for the reverse process)
|
||||||||
Examples: |
unset FIELDCONTROL_1 HIDDEN; unset FIELDCONTROL_2 on LAST_PAGE DISPLAYONLY; unset FIELDCONTROL_3 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unset FIELDNAME [ : id ] [ [ in ] table TABLENAME ] [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY | HYPERLINK;
FIELDNAME is the name of any field in the form TABLENAME is the name of the table containing FIELDNAME PAGENAME is the name of the page containing the field Id is the numerical field identifier and is supported only for forms upgraded from Version 3. If field FIELDNAME appears more than once on the specified page, the id is used to identify the specific occurrence. If not specified, the first field on the page named FIELDNAME is used.
if on PAGENAME is omitted, the field is assumed to be on the current page in table TABLENAME can be omitted where a table context exists e.g. inside a loop at table construct. |
||||||||
|
|
||||||||
Description: |
changes the display attributes for the specified field on the specified page and is the reverse of the corresponding set command. If the specified field is a table cell, the command is applied to the current row of the containing table.
If FIELDNAME is not found, the command is processed as the corresponding unset control command.
(see the set command for the reverse process) |
||||||||
|
|
||||||||
Examples: |
unset FIELD_1 HIDDEN; unset FIELD_2 on LAST_PAGE DISPLAYONLY; unset FIELD_£ MANDATORY; unset FIELD_3 table T1 MANDATORY; unset DUPLICATED_FIELD : 70 DISPLAYONLY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
This command is deprecated from Version 4.0, use corresponding unset control command instead. The command is supported only for forms upgraded from Ebase Version 3.
Syntax: |
unset group GROUPNAME [ on PAGENAME] DISPLAYONLY | HIDDEN | MANDATORY;
GROUPNAME is the name of any group on the specified page PAGENAME is the name of the page containing the group if on PAGENAME is omitted, the group is assumed to be on the current page |
|
|
Description: |
changes the display attributes for all fields in the specified group on the specified page, and is the reverse of the corresponding set command
DISPLAYONLY - data can be entered by the user HIDDEN - fields will be displayed on the page MANDATORY - fields will be treated as optional
(see the set command for the reverse process) |
|
|
Examples: |
unset group SALARY HIDDEN; unset group ADDRESS on PAGE_3 DISPLAYONLY; unset group G1 MANDATORY; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
unsetrow SELECTED | DELETED | EMPTY; |
|
|
resets the selected, deleted or empty status of the current row in the current table and sets the corresponding system variable $ROW_SELECTED, $ROW_DELETED or $ROW_EMPTY. This command can be reversed using the setrow command. |
|
|
|
Examples: |
loop at table ACCOUNTS if [ $ROW_SELECTED = 'Y' ] callscript PROCESS_SELECTION; unsetrow selected; endif endloop |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
update RESOURCE [ ( component_prefix ) [ BINDING ];
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of a database or custom resource, or the name of a form field containing a resource name. BINDING is optional and is applicable only for custom resources |
|
|
Description: |
updates a single row in the database resource setting column values from the mapped form fields. If any of the resource fields are marked as required but have no value when this command is issued, the form terminates with an appropriate message. Whenever an update is attempted, the number of records updated (if any) depends on the where clause in the database resource.
If the optimistic locking option has been activated in form properties, the system will check that the database record to be updated has not been altered by an external system since it was originally fetched. If this check fails, the command will return a status other than OK. (See $COMMAND_STATUS settings below).
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
$UPDATE_COUNT contains the number of records updated
|
Examples: |
update APPLICATION; update APPLICATION ( COMP1 );
CAUTION! Issuing an update against a database resource with no WHERE clause specified will update all records in the database table. |
$COMMAND_STATUS: |
OK |
- operation was successful, this includes the following scenarios:
|
|
ERROR |
- an update could not be attempted or was attempted but the operation failed |
|
NOT_FOUND |
- optimistic locking is set to 'Yes' - the record fetched earlier no longer exists, the update has not been performed |
|
VALUES_CHANGED |
- optimistic locking is set to 'Yes' - one/more of the fetched fields now contain a different value, the update has not been performed |
Syntax: |
upload; |
|
|
Description: |
displays the upload page and allows the user to upload one or more files. The following system variables are set as a result of executing this command:
$FILE_NAME The full path name on the server of the uploaded file $FILE_NAME_USER The last portion of the file name on the client
See working with files for a more complete description of uploading files using this command. |
|
|
Examples: |
upload; set FILE_CV = $FILE_NAME; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
updatetable TABLE;
|
|
|
Description: |
updates the external resource specified as the backing resource for the table with the table data. Internal row numbers are reset by this command and therefore the current row for the table may be changed. Circumstances that change the current row include: issuing updatetable on a table that has previously been sorted, issuing updatetable where one or more rows have been deleted.
$UPDATE_COUNT contains the total number of records updated, inserted or deleted
Note that optimistic locking processing is not available for tables. |
|
|
Examples: |
updatetable CUSTOMERS; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
Syntax: |
write RESOURCE [ ( component_prefix ) [ BINDING | WAIT ] ;
component_prefix is the name of the component prefix containing the resource, as shown in the Resources View but omitting the double underscore at the end e.g. if the component is shown in the Resources View with a name of Client_Address__ the component prefix is Client_Address. RESOURCE is the name of an MQ or custom resource, or the name of a form field containing a resource name BINDING is optional |
|
|
Description: |
XML resources: writes an XML document to the specified XML resource using the adaptor specified by BINDING (or the default adaptor if BINDING is not specified) The WAIT option is not applicable to XML resources. The document is populated from mapped form fields. See working with XML resources
MQ resources: sends a message to the MQSeries queue identified by the named MQ resource. Message is populated from mapped output form fields. If WAIT is specified, additionally waits for a reply and populates mapped input form fields with data from the reply message. See working with MQ resources.
The optional component_prefix is used to direct a command from a form level event to a resource configured within a component. See component concepts for more details. |
|
|
Examples: |
write XMLOUT; write XMLOUT ( COMP1 ); write CREDIT_CHECK_QUEUE wait; |
$COMMAND_STATUS: |
OK |
- command executed successfully |
|
WRITE_ERROR |
- a write was issued but the operation failed (MQ only) |
|
READ_ERROR |
- a write with WAIT was issued but the operation failed reading from the reply queue (MQ only) |
|
EMPTY |
- a write with WAIT was issued but the reply did not arrive (MQ only) |