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

Question

Question

Workflow - Iterate Using Token To Rename Entries

asked on September 4, 2019 Show version history

Hi, I am trying to create a workflow that renames files.

My current process:

  1. Six separate entries are scanned into a specific folder with a random string name "3834929384920"
  2. Once those six entries are in the folder, I want to iterate through all six entries and rename them (first entry scanned should be named "Section 1", then "Section 2" etc

 

I think I need to assign values such as "Section 1", "Section 2" to a token and use a rename loop. I am struggling with this. Any help would be appreciated.

 

Thank you!

0 0

Replies

replied on September 4, 2019 Show version history

Hayden,

Within your For Each Entry activity there will be a Rename Entry activity.  Just set the name of the document in the Rename Entry activity to 'Section %(ForEachEntry_Iteration)'.  Note: I would make this workflow a Business Process that will be triggered after the last file is scanned into the folder. If you need the documents to be named in a specific order then set the sort order of the documents in the activity that is feeding the For Each loop.

 

 

1 0
replied on September 4, 2019 Show version history

Cliff,

 

Thanks for the quick reply. I will give this a shot and report back. I really appreciate your response.

 

Edit: I think I made a mistake in explaining the process. The entry names are not going to be exactly "Section 1", but instead unique names... IE the first entry scanned in will be "Coke" and the second entry scanned will be "Pepsi"... etc. Sorry for the confusion. Does this make a difference for setting up the workflow/process?

0 0
replied on September 4, 2019 Show version history

Will the entries that are scanned always be in the same order?  i.e. 'Coke' is the first entry scanned, then 'Pepsi', and so on?

0 0
replied on September 4, 2019

Assuming the first document scanned will be 'Coke', the second one 'Pepsi', and so on you could assign the document names to a multivalue token and then as you step through the For Each you could reference the appropriate document name from the mulitvalue token by setting the index.

 

The token dialog would look something like this;

If there is a chance that there could be more entries in the folder than available document names I would add some branching logic that would test for that and then gracefully handle the error...

0 0
replied on September 4, 2019

Cliff,

 

Thanks for the quick reply. I will give this a shot and report back. I really appreciate your help. (YES, entries that are scanned will always be in the same order).

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

Sign in to reply to this post.