You can now create your own custom variables which can be used by all forms in your tenancy. This allows you to code your template with dynamic variables that will pick up different data depending on your tenancy's specific data. This is much the same as the MyUserData variables, but instead set at a tenancy level.
A great advantage of this is that if the business details that you have defined as tenancy-specific variables change, all you have to do is update the values in one record, and they will then pass through to all of your future form submissions. Tenancy-specific variables can also be useful for customising forms which are shared to or from other tenancies.
In order to create tenant specific data that can be used by your Forms and Projects we need to go through the following steps.
TenantData Form
Firstly we need to create a new form in the system called TenantData. Once the form is created we will add a text field which must be called 'RecordKey', and have a default value of 'TenantData'.
Next we are going to add a repeat field called Data. This repeat must have a maximum of 1 row, and it is recommended that you set this as a property.
Next you can add the text fields whose values you would like to be able to access in your tenancy's forms.
We suggest creating a submission workflow for this form which saves the record in an easily identifiable way. For example, this could be achieved by setting the record to save in a System folder in your records, and setting the record name to TenantData.
Creating your TenantData record
Click 'Save and Open' on your form.
Now, fill out the form with the data you want to make available to all of your forms, making sure to leave the RecordKey as TenantData. Once you are happy with the data for your tenancy, make sure you hit submit.
Editing TenantData
If you have created a Tenant Data record but you want to edit some of the values, go to Records and locate the TenantData record. To edit click on the form icon in-line with the RecordMatter.
The form will load with the record data. Simply change the values inside the repeat panel and save the form to update your Tenancy Data.
If you want to add different data to the same file, first update your TenantData form, and then load your record, edit and submit.
Accessing the Data
When your form loads the Tenant data will be loaded in to the Form.data object and can be accessed under The 'DataSources' object, in the 'TenantData' array.
From here, you can pull the data into another field using field logic.
Limiting who has access to your TenantData
Tenant data will be available to all of your users on any form they open and any record that is saved or submitted. If you want to restrict which users have access to this data, or which forms the data is loaded into, please take a look at our article on Data Sources.
Comments
0 comments
Article is closed for comments.