"Syntax for 'condition value' field in branch operator"

JoosBuijs
JoosBuijs New Altair Community Member
edited November 2024 in Community Q&A
Hi,

I feel this is a stupid question that must be documented somewhere but my Google skills are not sufficient to find it.

I'm using the Branch operator to decide whether or not some operator should be executed. The input on the condition port is an exampleSet with 1 row, 2 columns: 'Row No.' and 'att1'. Now I want to test whether row 1, att1, contains a particular string. So I set the branch operator's condition type to 'attribute_value_filter' but the following condition values are not accepted:
=="myString"
"myString"
myString

etc.
Note that 'myString' should be contained in the field, it will not be an exact match.

Any help is appreciated!!!

Best Answer

  • David_A
    David_A New Altair Community Member
    Answer ✓
    Hi,

    the correct syntax is actually Attribute_Name = myString.
    But the attribute_value_filter condition returns only true if all elements of the are equal to your string.
    If you only want to check a specific value in your data, you can use the Extract Macro Operator with the "data_value" option and then use the expression condition type and use %{macroName} == "myString"

    Best,
    David

Answers

  • David_A
    David_A New Altair Community Member
    Answer ✓
    Hi,

    the correct syntax is actually Attribute_Name = myString.
    But the attribute_value_filter condition returns only true if all elements of the are equal to your string.
    If you only want to check a specific value in your data, you can use the Extract Macro Operator with the "data_value" option and then use the expression condition type and use %{macroName} == "myString"

    Best,
    David