FormFieldNext
PowerScript function
Description
Finds the next form field after the specified form field. The type
of the form field may be FormFieldCheckBox, FormFieldComboBox,
FormFieldText, and FormFieldDate. You can specify which form field type to
look for.
Applies to
Syntax
|
1 |
rtename.FormFieldNext(integer fieldID{, string formFieldTypes[]}) |
|
Argument |
Description |
|---|---|
|
fieldID |
The ID of the form field based on which to search for the |
| formFieldTypes | The form field types the function shall search for. If unspecified, the function will search for all the form field types, including FormFieldCheckBox, FormFieldComboBox, FormFieldText, and FormFieldDate. |
Return value
Integer.
Returns the field ID of the form field that comes next after the
specified field.
Returns -1 if an error occurs. Returns -2 if the specified fieldID
is non-existent, illegal, or not of the required type (FormFieldCheckBox,
FormFieldComboBox, FormFieldText, and FormFieldDate). Returns -3 if no
field is found. If any argument’s value is null, returns null.
Note that if the field type of the specified field ID is not
included in the formFieldTypes[], the function returns -3. For example, if
the field type of the specified field ID is FormFieldText, but the
formFieldTypes provided is {“FormFieldCheckBox”, “FormFieldDate”}, the
function directly returns -3.
Examples
This example finds the next FormFieldText or FormFieldDate field,
whichever comes first, after the specified field (field ID: 28), and
returns the field ID.
|
1 2 |
integer li_fieldid li_fieldid= rte_1.FormFieldNext(28,{"FormFieldText", "FormFieldDate"}) |
This example finds the next FormFieldCheck field after the specified
field and compares the field ID with the specified ID.
|
1 2 3 4 5 6 7 8 9 10 |
integer li_formid1,li_formid2,li_rtn li_formid1 = rte_1.FormCheckBoxInsert(false) li_formid2 = rte_1.FormCheckBoxInsert(true) li_rtn = rte_1.FormFieldNext(li_formid1,{"FormFieldCheckBox"}) if li_rtn = li_formid2 then messagebox("FormFieldNext","Success!") else messagebox("FormFieldNext","Failed!") end if |