jens_martensson
July 24, 2019 22:38:21
Hi
I am trying filter workitems based on a string attribute, looking through the examples, literally all examples
and they are all using integer attributes, is string not working, if they are working, what is the magic?
`@some_string` == "foo"
Cheers
tpetrick
July 25, 2019 00:14:01
If you're using HScript, you need to use the
strcmp function to compare strings:
https://www.sidefx.com/docs/houdini/expressions/strcmp.html [
www.sidefx.com]
Strcmp returns 0 when the strings are the same, so for example
strmp(@pdg_output, “example.txt”) == 0. Or, using your example:
strcmp(@some_string, “foo”) = 0.