Creating a new entry using past entry, but restarting workflow [RESOLVED]

I am building a system and I need a way for users to take an old/existing entry and duplicate it or use it as a starting point for a new submission. I have GravityView and I understand how to implement the ‘Duplicate Entry’ functionality, but there’s a problem. When a new entry is created from this old one, I need it to generate a new, Unique ID for it, allow the user to make changes anywhere needed, and submit it as a new entry. This is important because these duplicated entries need to restart the workflow. When I just duplicated the entry, it pulled over the same unique ID and did not start a new workflow for that entry. Does anyone know how to accomplish this?

Hi @user65428e5876c73402,

It looks like within the GravityView duplicate_entry function there are a couple of filters and actions that you could use to remove existing unique ID values that should let it generate a new one on creation, and call Gravity Flow’s Orchestration API to restart the workflow for the newly created entry.

Alternatively, if you want to make the duplication process more specific (and measure how often that happens) you could use Gravity Flow’s Form Connector extension to create a new entry based on field mapping values from the previous.

In either case, if you need more help with the code snippets I’m sure either GravityView or Flow support team would be able to assist if you send in a request through their respective support forms.

For those interested: Ashley contacted us directly at https://www.gravitykit.com/support/, and we provided this code snippet: Trigger workflow after duplicating an entry in GravityView · GitHub

1 Like