How to compare a value in a list with a constant

Dm114

Well-known member
Hi.

May someone show me how to compare a value in a list with a constant inside a loop ?

Thanks
3 simple ways, depending how your list is stored:
1) if stored in a string variable, use Contain option of an If clause (or a Constraint)
2) if stored in an Array or Dictionary:
2¹) Iterate the Array/Dictionary and check each item or
2²) Store the Array/Dictionary into a string variable and use the 1} method
 
3 simple ways, depending how your list is stored:
1) if stored in a string variable, use Contain option of an If clause (or a Constraint)
2) if stored in an Array or Dictionary:
2¹) Iterate the Array/Dictionary and check each item or
2²) Store the Array/Dictionary into a string variable and use the 1} method
Hi.

My case is 2.1 but I don't know the syntax to compare. I've already used {variable} to click but doesn't know the syntax to compare this same value from iteration.

Thanks for help
 

Dm114

Well-known member
Hi.

My case is 2.1 but I don't know the syntax to compare. I've already used {variable} to click but doesn't know the syntax to compare this same value from iteration.

Thanks for help
If your list is not too big, you can avoid iterating with method 2²):
MyString=MyArray
If MyString contains "searched_text" Then...
 

Dm114

Well-known member
Otherwise to iterate (method 2¹):
Iterate MyArray
If [iterator_value] contains "searched _text" Then...
End Loop
 
Top