Event.Form.Inputs(FID).Options
.Options property returns the display list of options for a combo box (pick list). This does not return the list of indexes (the .Value) for each display text. This property only works on combo box (pick list) fields. All other fields will return a scripting error.
Note: You can view the full list of options by right-clicking on the caption text and clicking on the Options note field to pull up the list of options. The list is in the following format [Display Text] - [Index (Value)]. When accessing an option in the array, the index value cannot be used to find the display text.
Applies To
Properties and Methods
None
Available
The .Options object is available in:
- 16.04.058
- 16.05.060
- 16.06.028
- 16.07.002
- 17.00.001
- All newer builds
Note: The .Options object and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
Object
Syntax
Event.Form.Inputs(FID).Options;
Parameters
None
Example
//--Add this script to the NewOrd1 form layout
var laType = Event.Form.Inputs('Input_eTORD_to_ordtype').Options;
var lnCount = laType.length;
var lcType = 'Order Type has ' + lnCount + ' options.';
for (var lnX = 0; lnX < lnCount; lnX++)
{
lcType += '\n' + laType[lnX];
}
Event.Form.MessageBox(lcType);
/*Expected Prompt response:
Order Type has 18 options.
Complaint
SO Engineering
Forecast
Recurring
Credit Hold
Block Order
Order On Hold
Inter-Company Transfer
Seasonal
Pricing Order / Bill-To
Quote
Drop Shipment
Sales Order
Order Template
Master Order
Cross-Facility
Pricing Order / Billing Group
Pricing Order / Ship-To
*/