Re: To close an instance without locking it…

Home Forum General To close an instance without locking it… Re: To close an instance without locking it…

#5705

The instance locks because you don’t want two people editing the same instance at the same time. The last person to submit would have their changes saved and the first person would lose.

To answer the question properly I would need to have a better understanding of your process, however I can provide general direction: If the reason you are submitting an re-opening your instance is to get an instance number, you could use a behavior that submits, opens and submits the instance the first time “submit” is pressed, and then simply submits the form instance once every time thereafter.

Here is how you do that: Use a hidden helper field (# of times submitted). Build a behavior on when “submit” button is pressed. First set the hidden field using a formula: Value of the hidden field plus 1. Then use a simple branch object with a simple condition: Hidden field value = 2. If true submit and re-open same instance, if false submit and close.

Build another behavior on when form opens. Use a set field to set the instance number in a field. Then use a set field to set the hidden field using a formula: Value of the hidden field plus 1. Then use a simple branch object with a simple condition: Hidden field value = 3. If true submit and re-open same instance, if false submit and close.

I have built a simple test form to prove this works. If you would like to have a copy to review the behavior let me know and I will email the .pf file to you.