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

Question

Question

Workflow - Create new entry if entry already exists

asked on June 4, 2015

I am trying to use the Create Entry object to create a new folder but I want to create a new entry if the entry already exists. I have the return existing entry if entry already exists UNCHECKED but it continues to not create a new entry when the entry already exists. How do I ALWAYS create a new entry with the Create Entry object?

0 0

Replies

replied on June 4, 2015

If you're just stricting trying to create a new folder in the location in which that said folder already exists, then after the "Create Entry", you can place a task "Replicate Entries" and have it replicate your "Create Entry" task. This will then create a new folder with the same name, but numerically ordered in the end. 

and it would look something like this

Let me know if this is what you wanted. Hope it helps.

0 0
replied on June 4, 2015

It does copy the entry but the token generated %(ReplicateEntries_Destination Folder_FullPath) resolves to the original path of the copied entry. I don't see any tokens that resolve to the newly created entry.

0 0
replied on June 4, 2015

Can you elaborate more on what exactly you're trying to achieve? 

0 0
replied on June 4, 2015

I want to create a new folder, then access that folder later in the workflow.

Normally I can use Create Entry and then use the tokens generated by Create Entry to access that entry at any time. It worked when I was using it to create documents, but with folders it only works the first time, then it just stops creating new folders.

0 0
replied on June 4, 2015

So in otherwords, your scenario is as such,

You have a "Create Entry" that will create a new folder under the path \someworkflow called "Folder A". As a result of this action, you will now have a folder path as such: \someworkflow\Folder A. Then, somewhere down the line, you want to create another folder called "Folder A" under the same directory of \someworkflow, so that it will generate a path like: \someworkflow\Folder A (2). Is that what you wish to accomplish? 

0 0
replied on June 4, 2015

Just about, it is just creating a new folder once but the workflow can run more than once. So each time the workflow is run I want it to create a new folder, then I need to know what folder it created.

0 0
replied on June 4, 2015

Chad,

That feature is by design as it is to prevent users from accidentally creating an abundance of folder (1), folder (2), etc. What is your use case to have them labeled exactly as such? 

 

A solid workaround to get something like this, is to add a global > datetime as this be able to achieve the Folder (1), Folder (2) etc effect and in addition, it lets you know the time you created it. 

 

Hope this helps. 

0 0
replied on June 4, 2015

Ok, I will just add something unique to the name of the folder. I suppose that works.

It just seemed cleaner to simply create a folder and in the rare case where a folder with the same name exists then append a number to it. Just like I do with documents.

They are employee folders (Last, First). Everyone once in awhile you have two people with the same name.

0 0
replied on June 4, 2015 Show version history

Ah I see. But yes, what you're seeing is by design. A few suggestions to go about that, would perhaps to incorporate Middle initials/names into the folder names or utilize the other Global tokens available such as Entry ID, date, etc.

0 0
replied on June 4, 2015

You could run a Find Entry first and if the folder exist, go through a different branch that creates a second one with a different name. You would still have to come up with a pattern for these names because probably seeing "Babatie, Miruna", "Babatie, Miruna (2)", "Babatie, Miruna (3)" is probably not the best user experience for the people using these folders. Though, if the name doesn't really matter, I'd go with "Last, First %(id)" so the LF Server just tacks on the entry ID when the folder is created.

0 0
replied on June 4, 2015

I ended up naming it with the date and time for uniqueness, then renaming it with just the ID.

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

Sign in to reply to this post.