Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Conditional Processing » ChooseByCase

ChooseByCase


Returns one of the input objects depending on the specified case index.

Name Type Range Description
inObjectIfCase0 <T> Object to be chosen for the case 0
inObjectIfCase1 <T> Object to be chosen for the case 1
inObjectIfCase2 <T> Object to be chosen for the case 2
inObjectIfCase3 <T> Object to be chosen for the case 3
inObjectIfCase4 <T> Object to be chosen for the case 4
inObjectIfCase5 <T> Object to be chosen for the case 5
inObjectIfCase6 <T> Object to be chosen for the case 6
inObjectIfCase7 <T> Object to be chosen for the case 7
inCaseIndex Integer 0 - 7 Determines which object will be chosen
outObject <T> Chosen object

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Examples

Description of usage of this filter can be found in examples and tutorial: HMI Configuration Page.
inObjectIfCase0 = "Alice"
inObjectIfCase1 = "Bob"
inObjectIfCase2 = "Mike"
inObjectIfCase3 = "Katherine"
inObjectIfCase4 = "John"
inObjectIfCase5 = "Thomas"
inObjectIfCase6 = "Patricia"
inObjectIfCase7 = "Frank"
inCaseIndex = 2
outObject = "Mike"

Errors

This filter can throw an exception to report error. Read how to deal with errors here: Error Handling

Error type Description
DomainError Case index out of range in ChooseByCase.

Complexity Level

This filter is available on Advanced Complexity Level.

Filter Group

This filters is member of Choose filter group.

See Also