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

Question

Question

GetNumber stored procedure

asked on February 14, 2018

I have two forms that when they are accessed they are assigned a number from a table in the database. The number increments for each new form. When the form is submitted the field goes to read-only and keeps that assigned number throughout the remaining process.

The problem is each time that form is saved, approved, rejected, etc, on the backend database, the number gets incremented EACH time even though the report number is static on the form from step 1.

Any ideas?

 

0 0

Replies

replied on February 15, 2018

I had an epiphany last night. I copied the initial form to another form calling it "step 2". Step 2 runs all remaining steps in the process after the initial step 1 is submitted. Step 2 I took out the lookup rule so each remaining load or step of the process does not call that lookup rule again.

Just needed to sleep on it, I guess!

2 0
replied on February 14, 2018

You will need to add a version of the form that doesn't have that Lookup Rule, otherwise it's going to keep incrementing every time you revisit/reload the form.

Since the stored procedure runs, it increments the number in the database, regardless of what you see in the field.

Others might have a more elegant way of making the stored procedure not run using some type of Javascript.

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

Sign in to reply to this post.