CreateList |
Top Previous Next |
The following commands have been implemented in EMUEScript exactly as they are implemented in OLIE™: In addition, EMUEScript has implemented enhancements to the features and functions of this command.
Syntax - CreateList <list name> [<VerifyFieldCount>] [<Column to Sort>] [{ASCENDING | DESCENDING}] [<Column Type>] Where: <List Name> is the user defined name that is assigned to the list. <VerifyFieldCount> is one of two keywords: VerifyCount or NoVerifyCount <Column to Sort> is a number or variable containing a numeric value. <Column Type> is one of the following: Currency, Date, Number, String.
Description: By default, when retrieving a record from a list using GetListMember, the number of variables supplied must match the number of fields in the list. The VerifyFieldCount parameter configures this behavior for the given list. If VerifyFieldCount is set to NoVerify, then the GetListMember command may retrieve more or less values than what appear in the list. If more variables are specified than there are fields to fill them, any remaining variables will have a null value. If there are less variables specified than there are fields in the list, then the values will be stored in order that they appear in the list. Any remaining values in the list will not be assigned to any variable.
Optional parameters <Column to Sort>, <Ascending | Descending> and <Column Type> will allow your list to automatically sort on a specified column, in either ascending or descending order and treated as a specified type when the list is populated with data.
In a list where the sort column is specified as Currency and a field that is a Date is added to the column, EMUE will automatically sort the list as String due to the mismatch in type.
Note: For lists to automatically sort as items are added you must have the SetStartUp SortLists set to Yes. Note: Lists that are created automatically by EMUE when using the web add-on will not verify the field count.
Sample 1: The following example creates a list named PatientsList using the CreateList command and will not require the GetListMember command to verify the field count before retrieving fields. CreateList PatientsList NoVerifyCount
Sample 2: The following example creates a list named PatientsList using the CreateList command. It will require the GetListMember command to verify the field count before retrieving fields. This list will automatically sort on the 3rd column in an ascending order when data populates the list. CreateList PatientsList VerifyCount 3 Ascending
Sample 3: The following example creates a list named PatientsList using the CreateList command. It will require the GetListMember command to verify the field count before retrieving fields. This list will automatically sort on the 2nd column in an ascending order when data populates the list. During the sort, column 2 will be treated as a Date unless data is added that is not a Date. That will result in the column being sorted as a String. CreateList PatientsList VerifyCount 2 Ascending Date
See Also:
|