Lists in Visual Modeler
In many cases, the values a property may take can be expressed as a number or as a string of characters. In some cases however, a property has to take one of a certain number of pre-specified values such as the days of the week, or one of a set of manufacturer-specified formats such as SM, M, L, or XL
.
In these situations, the best approach to take is to define a property, of List type. Then you can write rules to test whether the value of the first property is in the list that is the value of the List property.
Thus, if you have a property called ShirtSize and you want to restrict the choices that a user can select to SM, M, L, or XL, then the steps are:
- Create a list called ShirtSizeList. Enter values for the list: in this case SM, M, L, and X.
- Create a property called AvailableShirtSizes whose type is List and assign it the value ShirtSizeList.
- Create the ShirtSize property and assign it to option items as appropriate.
- Create a rule that specifies that the value of the ShirtSize property must be in the list of the AvailableShirtSizes property.