Strange Switch Behavior

I was making a simple if switch and I was having trouble making it work. As you can see from the image it should work, but it does not. I am not sure if it is a bug? Currently on Version 11.0.4

Originally I was trying to test this out, but could not as well.

Any ideas what is going wrong?

For the first, make sure you haven't a trailing linefeed in the "contains" field that isn't in the text (easily done if you are Copy/Pasting into that field). But it'll be easier to tell if you upload a minimal macro that demonstrated the problem.

For the second, %ICUDateTime% is a text token, so won't work in a numeric (calculation) field. The error is more obvious if you use a "Set Variable to Calculation" action:

Here's a demo of the various cases, with the last action throwing the error as above:

ICUDate Switches.kmmacros (12.7 KB)

Image

1 Like

That did it! Thanks @Nige_S!