You are viewing limited content. For full access, please sign in.

Question

Question

Issue with Conditional Decisions and Date Tokens

asked on February 1, 2020

Hello, I'm having an issue with a workflow Conditional Decision activity.  In my Workflow, I retrieve info from a date field and store it into a custom token with formatting to only display the day of the week (Monday, Tuesday, etc.).  Then in my Conditional Decision, i have a separate branch for each day of the week and my condition is IF %(Day Token) equals "DayOfTheWeek", so for example: IF %(Day Token) equals SUNDAY.

When I test the Workflow I get an error at the Conditional Decision activity saying "String was not recognized as a valid DateTime" which I'm guessing is because the condition SUNDAY is just a typed string and the Date token is still technically a date, even if it says Sunday as the value. 

Is there a way for me to set these conditions up for day of the week?

0 0

Answer

SELECTED ANSWER
replied on February 2, 2020

Hi Grant

Couple things for you to check

Add a Track Token activity to your Workflow before your condition and specify the %Day Token to see what value is being held in that token.

Also, In the Assign Values where you assign it to the custom token, check your Token Tags and ensure String is checked and no others. This will ensure the output is treated as a  String Value

As far as your condition goes, it show look as you expected

0 0
replied on February 2, 2020

Thanks Steve!  That looks like a viable solution although I was a little impatient with it last night and ended up just using the Rename entry activity to name the document %(Day) - %(EntryID) and then changed the condition to valuate against the name and now it works perfectly and I just rename the document later in the workflow.  I know it's kind of a workaround but I was under a time crunch and just needed it to work!

I may end up changing to your solution down the road as it seems a little more solid but for now just going to stick with the rename workaround.  

Thanks for the help!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.