Variable Help

Does anyone know why these doesn't work in RM but do in WC.
IF (GC Daily Events eventTime(Thu Jul 15 09:15:00 BST 2021) contains %eDate%(F) [FALSE]) THEN
or this
IF (Variable eDate(Thu Jul 15) contains %eDate%(F) [FALSE]) THEN
or this
IF (Variable eDate(Thu Jul 15) = %eDate%(F) [FALSE]) THEN

The last 2 were just testing, all should equal true but don't

It's hard to say without seeing how you actually have this setup in Rule Machine (not sure if you're able to post screenshots), but variables written in %variableName% format not evaluate to the value of the variable except where specifically allowed, i.e., this will not work as you expect:

What you need to do instead is check the "Relative to a variable?" box, then you can choose the acutal variable to use for the comparison. Typing something into the box (like I did above) will just use that value as a literal string.

I didn't have a second variable I could use to perform a real-world test like you do, but this contrived example did work for me:

2 Likes

Thank you very much for your reply, the Relative to a variable didn't come up for me, because i used a device attribute (eventTime) from calendar search driver, I now use another variable which i set the attribute too. Thanks again for your help much appreciated

Ah, yes, that is the workaround if you need to do this kind of manipulation with a device attribute (storing that attribute to a variable, where you can do these operations on it). Glad you got something figured out!