Understanding Variables
Variables are used to pull various collected data to be used in output templates.
Variable data is collected from the user or from the program. They are also presented in a one-to-one relationship. This means that the data is associated with a single input or output. The key before the colon is the Variable Key, and the value after the colon is the Value.
Variables are a useful tool when creating and deploying programs. By understanding the relationship between a key and a value, developers can make their work more efficient and easier to debug.
Variable Syntax
💡 An example - {{ client_profile.name }} will return the Company name from the Client Information section
Note {{ and }} are the key tags used in variables, so they should not be used elsewhere.
Variable Type - Additional Data Fields Data
Additional Data Fields Data is presented as {{ "field name" | additional_field_value | or_empty }}
Additional Data field answers can be presented using variables.
The required syntax is {{ "field name" | additional_field_value | or_empty }}.
Replace the field name with the name of the Additional Data Question.
The double quotes before and after must be retained.
If the additional data field name contains double quotation marks itself, the double quotation marks before and after would need to be changed to single quotation marks - Example {{ 'Please call " me ' | additional_field_value | or_empty }}
The field name is case-sensitive.
As this variable is tied directly to the name of the Additional Data Question, if that name is changed for that side, the variable name would also need to be updated
Available Variables
Name | Tags | means |
Project Name | {{ project_name }} |
|
Drawing Name | {{ drawing_name }} |
|
Date of proposal created | {{ report_time | date("m - d - Y") }} | Month - Date - Year |
| {{ report_time | date("d/m/Y") }} | Date/Month/Year UK date format |
Account Job Title | {{ account_profile.job_title }} | new add at 11.10 2021 |
Account Name | {{ account_profile.name }} | new add at 11.10 2021 |
Drawing first version time | {{ drawing_first_version_time | date("l, F d, Y") }} | Tuesday, November 23, 2021 new add at 11.23 2021 |
Drawing last version time | {{ drawing_version_time | date("l, F d, Y") }} | Tuesday, November 23, 2021 new add at 11.23 2021 |
Category products format text | {{ "Turf" | category_used_products_format }} | get the Turf category included products info, and return {total_quantity}' {unit}. {product_names} |
category products total quantity | {{ "Turf" | category_used_products_format (’{total_quantity}’) }} |
|
| {{ "Turf" | category_used_products_names }} | used product names list of the Turf category |
total price | {{ "include" | project_total_price }} | the included products total price after tax, if you want to get 'total or exclude price' just replace include to total or exclude. |
|
| Add new parameter “digits” to control price precision. If you don't want to control the precision you don't need to care about it, if you need to use it you can use it like this: {{ "include" | project_total_price(digits=0) }} |
payment balance | {{ True | payment_data | access_data("balance_amount") }} | get the balance amount from payment |
|
| Add new parameter “digits” to control price precision. If you don't want to control the precision you don't need to care about it, if you need to use it you can use it like this: {{ True | payment_data(digits=0) | access_data("balance_amount") }} |
deposit amount | {{ True | payment_data | access_data("deposit_amount") }} | get the deposit amount from payment |
|
| Add new parameter “digits” to control price precision. If you don't want to control the precision you don't need to care about it, if you need to use it you can use it like this: {{ True | payment_data(digits=0) | access_data("deposit_amount") }} |
Sub total | {{ "include"| project_subtotal_price }} | Add new parameter “digits” to control price precision. If you don't want to control the precision you don't need to care about it, if you need to use it you can use it like this: {{ "include"| project_subtotal_price(digits=0) }} |
|
|
|
Available Filter functions
number_ceil | {{ 12345.67 | number_ceil }} | round up a number(Make sure the value before the | is a number) |
Full Address | {{ 12345.67 | round_tool(2) }} | The precision of the control value, the value before ”|“ is the value to be controlled, and the number in brackets indicates the number of decimal places you want to display: for example, {{ 123.27 | round_tool(1) }} you will get 123.3, {{ 123.27 | round_tool(0) }} you get 123. |
Additional Data Fields In Practice
So, for example, if your client's name was ACME, it would be presented in the following data pairing:
"name": “ACME”
If you wanted to add the client's name to a sentence, you would add the parent grouping title to have this overall:
{{ client_profile.name }}
You could then create the following sentence:
Contractor agrees to provide ACME with 12 helical piers.
By using:
Contractor agrees to provide {{ client_profile.name }} with 12 helical piers.
We can continue to customize the same sentence by replacing the term Contractor as well. Using the {{ org_profile.name }} the sentence becomes:
{{ org_profile.name }} agrees to provide {{ client_profile.name }} with 12 helical piers
Then lastly, we can replace the “12 Helical Piers” piece by pulling in the data from the added products to have:
{{ org_profile.name }} agrees to provide {{ client_profile.name }} with {total_quantity} {{“category_name” | category_used_products_names }}