Search - User list
Full Version: Partition, Filter by expression examples are just Integers
Root » PDG/TOPs » Partition, Filter by expression examples are just Integers
jens_martensson
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
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB