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

Question

Question

Multiple Token Path

asked on December 13, 2017 Show version history

Hello,

I am trying to use 2 tokens to define a path for a file.

I have 2 metadata fields, Client ID and Invoice Date.

I want the files to end up in folder by Client\Client ID\Invoice Date(year), so Client\123456\2017, if they are not already in that location

I am using a routing decision to test the path of the entry,

\Client\%(RetrieveFieldValues_Client ID)\%(RetrieveFieldValues_Invoice Date#<\d\d\d\d>#)

 

However the routing decision seems to only recognize to the first token, so the condition reads:

[FALSE] If all of these conditions are false:
    [TRUE] Entry Path: '\Client\123456' <equals> '\Client\123456\'

 

Is there something I am missing, or is there a limitation to the # of tokens used in identifying path?

 

Thank you

0 0

Answer

SELECTED ANSWER
replied on December 13, 2017

One thing I notice is that you seem to be using RegEx on the date token instead of the DateTime formatting. If you want to extract the Year, you should try using this instead.

%(RetrieveFieldValues_Invoice Date#"yyyy"#)

It is likely dropping the second token because it isn't evaluating the regex/token the same way when the process actually runs.

2 0

Replies

replied on December 13, 2017

I'm not seeing that behavior. Are you sure the Invoice Date field had a value at the time this workflow ran?

Side note, though, you can just move the document without checking first. Workflow won't do anything if the document is already in the right folder.

0 0
replied on December 13, 2017

I am sure that invoice Date field had a value before running the workflow

For my test file,  had the file sitting in a dev. folder area under \Client\12346.  There is no \Client\123456\2017

I just reran the test, condition works fine if file is sitting in \Client, but if I place it in \Client\123456, I get the same Condition mentioned above. It seems to 'drop' the 2nd token,  '\Client\123456' <equals> '\Client\123456\'.

0 0
SELECTED ANSWER
replied on December 13, 2017

One thing I notice is that you seem to be using RegEx on the date token instead of the DateTime formatting. If you want to extract the Year, you should try using this instead.

%(RetrieveFieldValues_Invoice Date#"yyyy"#)

It is likely dropping the second token because it isn't evaluating the regex/token the same way when the process actually runs.

2 0
replied on December 13, 2017

that seems to have done it!

Thank you

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

Sign in to reply to this post.