I don't understand why "all of the following are true" is "currently true"

Hi,
I have a macro, that calculates "next workday" and has some global variables for configuration.
So Official Holidays are configurable, personal vacations are configurable and weekdays can be configured. For the holidays I add simply the fixed official and personal holidays (see screenshot) and for Non Working days I use what I found here Using Day of the Week - #2 by peternlewis
I than have a "Execute until", that simply adds day by day from today, until it finds the next "free" Workday. This is fast enough, as we are talking about max 20-30 days the "execute until" has to work.

Today I wanted to enhance the macro, so that non working days are not only SAT/SUN fixed, but could be "somehow" configured. For this I used the variable "MeineFreienWochentage" and set it to SUN/WED/SAT aka 1,4,7

But this does not seem to work, as IMHO it should be false with the shown variables, but KM still assumes it is true. See variable output in the screenshot.

Any idea? I am totally stuck.

If instead of the One variable "MeineFreienWochentage" "contains" Testdow, I add three times the fixed
if Testdow is != 1
if Testdow is != 4
if Testdow is != 7
everything works like a charm, but I do want to configure the "off days" in one area and not tell the people that is has to find the right spot in the macro.

any idea?
thanks
Juergen

It all looks fine, so my guess is you have an extraneous space in one of your "does not contain" fields.

Keyboard Maestro Actions.kmactions (2.0 KB)

Keyboard Maestro Export

1 Like

Ho Peter,

Many, many thanks.

You where totally right (Testdow had a space after the number, worked when comparing numbers for sure, but not with strings.)

I feel ashamed, but paid for it with my 4 hours debugging yesterday.

Many thanks
Juergen

Don't feel ashamed, it's basically impossible to spot unless you think to check.

Sadly, I can't think of any way to make it more obvious. Maybe the Value Inspector should try to make it more clear if there is leading or trailing space.