Quick question on boolean variable setup


#1

This is a really quick one.

In webcore I’m just trying to set my boolean value to true or false based on whether or not another thing is a certain result.

Issue I’m having is with my lack of knowledge on the topic.

I’m using the if X is “ANY OF” W,Y, or Z, then X = false

But how do I separate W, Y, and Z? in the field where I type them in, I tried semicolon but that wasn’t it.

I could make and or statement for EACH possible result but that seems like it would be very inefficient.


#2

Have you tried setting the value as an Expression and doing the evaluation from there?
Also an example of the piston would be great so people would have an idea of what you’re trying to accomplish.


#3

Yeah I would do it as an expression as well, I think that would be easier and cleaner, but I just don’t know the sytax I need to use in that field to get it to work.

Here is what I’m trying to do, really simple:
download


#4

Commas worked for me


#5

Thanks a lot, that works! How would I do it like you said, as an expression at the beginning of the piston?


#6

I feel like there should be a shorter way…


#7

oh jeez, yeah I would have never figured out that syntax. Thanks again, really appreciate it!


#8

What about this?


#9

I would consider this approach:

IF $dayOfWeek is between 1 and 5
THEN Set variable {weekday} = true
ELSE Set variable {weekday} = false

(Regarding $dayOfWeek: 1 is Monday up thru 7 being Sunday)