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

Question

Question

Is there a way to start an Instance Number back at 1?

asked on August 17, 2021

We want to be able to create a form and after submission, the Instance ID starts at 1 and maybe set a number range specific to that form.

0 0

Replies

replied on August 18, 2021

That is not possible because the Instance Id is a global identifier for the instance table meaning it increments for all processes in Forms.

If you want an independent counter for that specific process, then you'll probably need to create an external data table and track/generate it yourself.

You could do that by creating a simple SQL table with an Identity column, maybe store the BP Instance Id to "connect the dots" between the Forms BP Instance Id and your sequential ID, and add columns for any other data you find useful, then run a workflow right after each submission.

In the workflow, use an insert data activity to add the record to your table and check the box to generate the identity token, then use Set Business Process Variables to pass that back to your bp instance.

However, it does sound like a useful feature request (i.e., adding a new identifier that is independently sequenced for each business process).

2 0
replied on August 18, 2021

You can also use the repository itself as a place to store the identifier, in a number template field assigned to a blank entry.

Workflow has an activity to ensure only 1 instance is running at any given time as well, so that a queue will be created if multiple calls come in simultaneously.

1 0
replied on August 18, 2021 Show version history

If you're referring to Simple Synchronization, that has a pretty substantial impact on performance so I've avoided it at all costs.

EDITED: I thought you were referring to Single Instance Mode, which cancels instances, but I realized you probably meant the Synchronization activity which does not.

1 0
replied on August 18, 2021

Oh it cancels the workflow? That is not good, I thought you could have them run one after the other.

1 0
replied on August 18, 2021

My mistake, I thought you meant Single Instance Mode, which does cancel, but when I noticed that you said "activity" I realized you probably meant the Synchronization Sequence, which does act more like a queue.

2 0
replied on August 18, 2021

Oh I think that is it, I have not used it yet but remember learning that its in there.

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

Sign in to reply to this post.