Variables

Smartform variables can be used within a smartform to use them into other elements or insert external values. There are three types of variables :

Internal Variables - {{ }}

An element is recognized with a Property value. By trying to fill in the property value into for instance a text field like this {{ InputName }} the field will get colored and when the field with property Input Name gets a value it will also be displayed where it is used as a variable.

Internal variables is very useful in combination with text : “Dear {{ InputName }} , we are very happy…”

Datatable value - [[ ]]

This is another type of external data that can be used in a smartform for display values. A typical usage would be when somebody are to change an address etc, then you could add the address as datatablevalue so you always can show the user what the previous address registered were when they make their changes.

In order to use datatable values within a smartform you just include then into double brackets like this:

[[ Variable ]]

Datatable values can be supported by REST API calls when creating a smartform. You then need to include this section into the json body:

    "datatablevalue" : 
    {
        "Street":"Harbour street 23",
        "Postalcode":"0234",
        "Postalcity":"Stockholm",
        "Country":"Norway" 
    }

In order to use this in a smartform text you would type : ” We have registered that you live in [[ Country ]] ” The variable will show in blue in the Studio application to indicate that you have entered it correctly. Remember to have space on both sides of the variable within the brackets.

External MetaData

External MetaData are variables given from a calling system to be included into the smartform payload. A typical area would be to use External MetaData to help connect the smartform with values in a calling system. If the calling system is for instance Salesforce, it might be that you would like to add a key that will help in mapping to a case, contact etc.

Example on how to include externalMetaData:

    "externalMetaData" : 
    {
        "CRMTaskid":"12345678"
    }