Adding a new version of a form to prod:
Occasionally new versions of the form have to be moved to production which include enhancements made to the current version of the form.
In such cases, it is important to retain the instance numbers so that the forms follow in a consistent manner. In order to do this, the following changes have to be made on the form:
1. Create a new stage in the Workflow (W) as ‘Prelim – Create Instance Number’ that is now set to the default stage as shown below.
2. Under the ‘Form Properties’ behavior – ‘Form is opened’ – add a simple branch that checks if the Form – Stage = Workflow – Stage “Prelim – Create Instance Number” as shown below:
3. If the condition is true then the same instance is opened again but, if the condition is false it shows based on which ‘role’ is opening the form i.e. if the form is opened by the submitter or (e.g. Tax Compliance). All forms currently have just two roles defined – it is either the submitter of the next person or department that is going to receive the form (e.g. Tax Compliance).
4. If the Form – Role = Tax Compliance then the form is in the ‘In Process’ stage which means that the form will not allow for submission and will display the following buttons on the form (Approve, Forward, Disapprove, FAQ and Attach) otherwise the form will be in the ‘New Request’ stage which means that (Submit, Save, FAQ and Attach) buttons show.
5. In both cases, next a simple branch checks to see if the form stage is ‘New Request’ or instance # is 0 as shown below.
6. If the form is in the ‘New Request’ stage (i.e. true) then the form instance is set to “New Form” and the lblHash field is hidden.
7. If the form is the ‘In Process’ stage then the form instance is got from the Form – Instance Number and the lblLabel is displayed.
8. The instance number at this point is then updated using the Set Field by the number of the current instance # of the form in the older version of the form that is – if the old version of the form is at 10 then the value added to the form instance will be 10.
From this point on the same actions are followed as per the 'form is open' behavior.