compare three variable

Hello,

I would like to compare three variables (text) and trigger an action if one of the three variables is found. do you know how to do it? Thanks.

2 Likes

What do you mean by ‘found’?

2 Likes

sorry i didn’t explain very well. I would like to do somethings if two of the three variables are identical.

1 Like

Yeah, just a messy boolean node setup basically. You could put it in a function to make things neater…

image

But this assumes none of them is empty.

If you make a function that checks this and then compares 2

You can use it to make the 3 version better:

3 Likes

Here is an alternative that that could easily be adjusted to handle different numbers of elements.

Edit: for something dynamic it would be something like this:

5 Likes

That’s nice :slight_smile:

2 Likes

thanks guys, i found this solution thanks to your advice