Home Search

DriveWorks Solo 22
ChooseFrom

Send Feedback

ChooseFrom

Selects a value based on a match found in an input, within a string of arguments.

Textual input values are case sensitive

Syntax

ChooseFrom( [Input] , [ Default Value] , [ InputValue1] , [ Value1] , [ InputValue2], [ Value2] , [ InputValue3] , [ Value3] )

Provides conversion functionality by selecting a value based on a match found with an input value. If no match is found the specified default value is returned.

Where:

Input is the value or reference to a value that specifies which value argument to select

Default Value is the value to return when no InputValue is found

InputValue1, InputValue2, InputValueN is a value being returned from the Input

Value1, Value2, ValueN is the value to return when the corresponding InputValue is returned

InputValue and Value arguments work in pairs.

Examples

Rule

Meaning
ChooseFrom(ColorReturn,"0|0|0","Red","255|0|0","Blue","0|0|255","White","255|255|255")

Returns 0|0|0 when the Color control is not Red, Blue or White

Returns 255|0|0 when the Color control is Red

Returns 0|0|255 when the Color control is Blue

Returns 255|255|255 when the Color control is White