String Contains function in the Expression Binding

Hi there. I’m curious if there is a way to do a string contains type function in the expression binding on a custom property. For example, something like string.contains(‘search_data’) - something similar to that. Is there anything like that in Ignition?

You might be able to use indexOf

Yes this is perfect, thank you!

Does this require a function? Can you provide an example?

Sorry to bump ancient thread… but for anyone passing by:

Example to see if string contains another string (note it is case sensitive):

if( indexOf("ignition", "itio") != -1, doSomethingIfTrue(), fallback() )

1 Like