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

Question

Question

Should All Field Names (Variables) Have a Unique Name? Even it Could be Used in Dozens of Different Forms?

asked on September 14, 2017

As we begin our journey of creating the first few, of what we expect to be many, forms and business processes, are there any best practices for making sure every form field has a unique name (including the variable name)?  Even if it's a field that conceptually be used in dozens of different forms?

For example, a radio button field that contains two choices,  "Active" and "Inactive" could potentially be used in many different form applications.  Should each different form which requires a status field have a unique variable name (e.g., Employee_Status, Customer_Status, etc.) or could the variable "Status" be used in many different forms, as long as the radio button choices are the same.

Any clarification on this subject would be greatly appreciated.

0 0

Replies

replied on September 14, 2017 Show version history

John,

Form variables work much like Tokens in Workflow, or variables in a custom application; they are "local" variables contained within each form process/instance (two forms within the same business process will share the same variables).

If you have Form A with a variable named "Status" and Form B with a variable named "Status" they will not conflict because they exist in separate self-contained environments. Basically, Forms knows the difference between "Form A Status" and "Form B Status"

That being said, I find it is helpful to set variable names with their purpose/context in mind much like one would do when writing application code, especially when your forms start getting more intricate and complex; this can simplify maintenance, updates, report building, etc.

The question you want to ask is, if someone else is dropped in down the road without the original designer's guidance, how difficult would it be for them to determine what "Status" means.

Field names should be about what's best for the user experience more than anything and the primary concern would be whether or not it makes sense to whoever needs to fill out the form (in some cases you may have multiple fields on the same form that share a field name and only differ in variable name).

3 0
replied on September 14, 2017

Hi John,

Forms variables names are unique to the specific process--so, using your example above, you can have a radio button field whose variable is named 'Status' in your 'Employee Onboarding' process, and another radio button field with the same variable name in your 'Customer Follow-up' process.

However, you would need to use different variable names if these radios factor into the same process--if one of your processes involves an 'Active/Inactive' radio that pertains to Employees and another that pertains to Customers, you would indeed want to name them uniquely, since they represent different things. If you attempt to use the same variable at both stages in the process, the value from the first stage will persist in the second.

Bear in mind that if you create two radio button fields in the same process and give both a 'Field label' value of 'Status', Forms will automatically name the second field 'Status_1'. For the sake of clarity, I always advise my clients to manually name their variables during field creation. So, to finish up with our example, you can have to fields, each with a 'Field label' of 'Status', but one will have a variable name of 'Employee_Status', the other 'Customer_Status'. This will help a lot later on, if Forms passes values to Workflow, etc. 

~Rob

2 0
replied on September 14, 2017

Both great answers for different reasons.  Thanks!

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

Sign in to reply to this post.