I am making a workflow that is supposed to compare dates to find the largest out of a search. I changed the token to be treated as a date rather than a string but it is still not working correctly.
I am making a workflow that is supposed to compare dates to find the largest out of a search. I changed the token to be treated as a date rather than a string but it is still not working correctly.
Where do the values in For Each Value come from?
For Each Value always sets its tokens as string, so the entire conditions evaluates as string. You can use an Assign Tokens inside For Each Value to set them as dates, and then use the newly created token in the condition instead of For Each Value's current value.
Can you add a screenshot of how the condition was evaluated at run time (from the Conditions tab in the instance details)?
As you can see here the condition is evaluating incorrectly.
[False] If all these conditions are true:
[False] Entry Token (ForEachValue_Current Value) '2/2/2015 (is greater than) '7/18/2014'
This one did evaluate correctly. The token starts at 01/01/1900
Yes. I republished and created a new test document which triggers the workflow. Im thinking I may need to remove the tokens and add them back into the workflow to refresh it. Will update here.
I removed all the tokens and saved then added them back in but that still didnt work. I also recreated the workflow and the tokens are still not evaluating correctly.
Do we need to break it apart so it evaluates the year first and then the month and day?
Workflow server is 9.2.0.167.
Where do the values in For Each Value come from?
For Each Value always sets its tokens as string, so the entire conditions evaluates as string. You can use an Assign Tokens inside For Each Value to set them as dates, and then use the newly created token in the condition instead of For Each Value's current value.
Thanks that is very helpful to know for the future.