I am using the current version of KM, 9.2. I am downloading my bills and statements from websites. Since they get posted throughout the month I want to compare the day of the month they get posted with today's day. However, as you'll see from the below screen shots, every combination of testing the date I want to run getting a particular bill or statement ("Run_Date") against today's date ("Todays_Day") comes up false. That is every combination of <, <=, =, >=, >, !=. Obviously, some of those would have to be true if their counterpart is false. So something is clearly wrong.
I also did a test on Matches and Does Not Match just to be sure the variables were being evaluated. That does work in that my test date of "2" did show false when asked if matched today's date (which happens to be "7), but did show True for the Did Not Match test. Likewise, when I set Run_Date to 7 the Match was True and the Does Not Match was false.
That makes me think that KM is treating them like strings (but even so the string "2" is less than the string "7"). But I saved the variables as calculations which should have saved them as numbers. Anyone know how to fix this or what the problem is? BTW, I was having this same problem before I upgraded, which was 8.2.4, and one of the main reasons I did so was hoping this was fixed.
It seems to work if you change the If action as follows. Not sure why it doesn't work as you have it, but I suspect your string/number thought is correct
Yep. What is wrong is that you have NOT entered a valid KM Variable in the numeric calculation field of the IF/THEN Action:
When using a KM Variable in a numeric calculation field, just enter the Variable Name.
Do NOT enter it as a Variable Token with the % symbols.
As stated above don't rely fully on the KM Editor evaluation. Always run the Macro to test it.
Also, in the future, always upload your macro so that it is easy for other to inspect and test.
Here's is my TEST macro that works fine:
Example Output
Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
when you want them interpreted as numbers, so that you can perform numeric tests and other numeric operations on them, you need to do that in one of the special calculation fields.
You know that your cursor is in a calculation field when a small letter C appears at top right of that field.
If you are seeing a T at top right then you are in a field which interprets your value as text, and not as a number (unless you make explicit use of the %Calculate% token).