GetFieldValue

Gets the value of the specified field.

Note: The SBM AppScript also has a GetFieldValue method.

Parameters

Name Type Description
fieldName String The name of the field.
defaultValue (optional) String The default value to return if the field does not exist on the form, if it is not found, or if its value is empty. If this parameter is not provided, "null" is returned.

Return Value

Field Type Field Style Return Value
Binary/Trinary Drop down list, Radio buttons String value of the field.
Binary/Trinary Check box Numeric value 1 if checked; empty value if cleared. (It is recommended that you use IsFieldChecked instead for this field type and style.)
Date/Time Date and time, Date only, Time of day A Date object containing the value of the field.
Date/Time Elapsed time Numeric value for the number of milliseconds of elapsed time.
Folder N/A String value of the field
Multi-Group, Multi-User, Multi-Selection, Multi-Relational N/A String value of the field. If multiple values are selected, a comma-separated list is returned. If the values have embedded commas, use GetFieldValues instead to retrieve the array.
Numeric N/A Numeric value of the field.
User, Single Selection, Single Relational N/A String value of the field.
Sub-Relational N/A Depends on the referenced field.
Summation N/A Numeric value of the field.
Text N/A String value of the field.

Examples

This example returns the string value of the Unit Price field:

GetFieldValue("Unit Price");

Comments

(none)