HomeGuidesRecipesAPI
HomeGuidesAPILog In

Reference Tags

Question references and Constants

Reference tags are used to link question answers data, and constant values, to other data dynamically. All reference tags are contained within square brackets [] and operators and other path data, like pointing at specific answers when there are multiple, uses a point ..

Custom Reference Tags

Custom reference tags come in multiple different forms and be created as part of an uploaded Template, as Placeholders or as Custom Fields.

👍

Best Practice

References you create should be unique, if they are generic like [name] they risk being doubled up and this will become confusing fast. Try reference names like [CustomerFirstName] instead.

Question Reference Tags

Question references are formatted with an ID and a answer number or name, [q(question-ID).(answer-number/name)], [q1.name], so a question with multiple answer questions will change the answer number/name for each answer. However, some questions can have unique outputs, and multiple of them; in these cases the answer number becomes a file name or base64 string.

If you are unsure what the correct reference tag is meant to be, the question reference is noted in the top right of the inspector panel, clicking on this reference will copy its reference tag to your clipboard.

Alternatively, simply click and drag the answer to a text box and it will be automatically filled with that questions reference tag.

Questions should only refer to other questions which come earlier in the form structure.

🚧

References to later questions (a forward reference) may work, but can also behave unreliably; for this reason forward references are not recommended.

🚧

Question reference tags operate differently within a repeater context.

Within a repeater, question tags are only able to retrieve answer data from within their current repeat. To reference a previous repeats' question answer the previous tag is required.

reference dependencies

Finding reference dependencies is in the question more options menu, in the inspector panel, next to the question reference. You can also get to it using the context menu, in the Pages panel, when you right-click an item that can be referenced.

operators

Additional operators can provide extra control to the data being passed through reference tags.

  • [Protect.q1.1] - Used to protect a value after it has been referenced so it can't be edited by the user.
  • [q1|default] - A question reference default value can be set using the pipe character | and entering the default value after it.

Constant Reference Tags

When sending emails to users (usually the assignee of a Workflow task), SmartIQ can replace a number of pre-defined values with corresponding information which it might otherwise be difficult or tedious for the designer to obtain.

TagReplaced with
[Comments]
[Comment]
User comments on workflow submit
[ProjectName]Published name of project
[StateName]Name of workflow state
[AssigneeFullName]Full name of assigned user
[AssigneeFirstName]First name of assigned user
[AssigneeSurname]Surname of assigned user
[RequesterFullName]Full name of requester
[RequesterFirstName]First name of requester
[RequesterSurname]Surname of requester
[SenderFullName]Full name of sender
[SenderFirstName]First name of sender
[SenderSurname]Surname of sender
[ReceiverFullName]Full name of receiver
[ReceiverFirstName]First name of receiver
[ReceiverSurname]Surname of receiver
[AccessCode]Temporary user access code for the assigned temporary user. Access Code type has to be set in Custom Properties to be placed in workflows. The AutoGenerated generation option in Project Settings will guarantee a unique code.
[ProjectLink]HTML hyperlink to the in progress workflow. Note: Parts of the link can be adjusted, refer to [ProjectLink] Where possible, the project link will attempt to link directly to the point of the form in context. For example, if the email is a notification about a comment on a particular page, the link will take you straight there.
[ProjectLink|FlagAsTempUser]
[ProjectUrl]Similar to project link but returns the raw URL only. Usually so that it can be rendered in a paricular way by the designer.
[WorkflowId]Unique identifier of the workflow task
[Choice]Refer to Email Approval for details.
[QuestionText]Where the notification is in the context of a question, for example, a comment notification, the question text of the item in context will be rendered.
[ErrorPage]

❗️

Access Codes must be unique

When using the [AccessCode] Reference to generate an access code, note that each access code must be unique. If you are self generating an access code use Sequences or some other algorithm that will guarantee a unique value. Forms that contain non-unique access codes will not submit.

The [AutoGenerated] option for Access Codes guarantees a unique code.

Note: take care when generating an access code using a sequence as these may be predictable and therefore not secure.

[ProjectLink] reference tag

The [ProjectLink] reference tag is replaced by a HTML link that points to the current workflow state for a project.

Reference tags in a project link can be combined using '|'.

Parts of the resulting Project Link can be overridden with:
LinkUrl=
LinkText=
StateName=
ProjectName=
ProduceUrl=

These are passed as a pipe-separated list of key-values:
[ProjectLink|LinkUrl=https://google.com|LinkText=This is a link to google]
The above example will result in a link like:
<a href="https://google.com">This is a link to google</a>

If a ProduceUrl is supplied, other values will be appended to it to construct the URL as if the supplied value were the Produce URL of the system.

The positions of the placeholders in the formatted link are as follows.

If LinkText is not supplied:
<a href="LinkUrl">ProjectName - StateName</a>

If LinkText is supplied and is not empty:
<a href="LinkUrl">LinkText</a>

If LinkText is supplied as empty:
LinkUrl

📘

Temporary Users

If FlagAsTempUser is supplied as a pipe-separated argument and the user is attempting to access a form that they have already completed, they will see a This form is no longer available message rather than the user login screen.

Connector specific Reference Tags

TagDescription

Repeater specific reference tags

TagDescription
[RowNumber]Retrieves the current page number
[RowCount]Counts and returns the total number of pages
[Previous.q 'question number'.'answer number']References a question answer in the previous repeat, by simply adding 'Previous.' in front of the normal question reference tag SmartIQ will resolve the current repeat answer using the previous repeats question answer. For example, if designers want to reference the answer of question 1 from the previous repeat and not the current q1.1, this is when [Previous.q1.1] is used.

🚧

The 'previous.' reference tag will make a repeated question return 0 if the question is self referencing.

Nested actions

Action inputs in workflow can reference previous action output using [parentaction.output]

Reference Tag Exemptions

Certain properties of certain blocks can't read reference tag data or don't have any reference tag data. These are Exemptions, where reference tags don't work or are inapplicable.

All Writable Data Objects

QuestionsProperty
Action ButtonClass Name
ChoiceOption List - Grouping Id
Answer - Value
DataAuto Complete - No Data Text
File SelectionUpload File - Button Text
Upload File - Answer File/ Save by Unique label
Camera Back - Take Photo Button Text
Launch URL QuestionInput - URL -> Name
Video PlayerVimeo - Public Link
VisualsInput - Name - Name property (used a different project)
LayoutProperty
PageRepeating - Repeat Name
SectionRepeating - Repeat Name
ActionsProperty
Call SQL Stored ProcedureStored Procedure Parameter - Name Input
CMIS Save DocumentAccess Control Entries (Principal: Permission)/ Metadata (Parameter = value)- Name Input
CMIS Update DocumentAccess Control Entries (Principal: Permission)/ Metadata (Parameter = value)- Name Input
Convert Document to Base64
Post to Webhook ActionAnswer Values/ Custom Headers - Name Input
Salesforce Create Record ActionField - Name Input
Salesforce Update Record ActionField - Name Input
Save to AWS S3 Bucket ActionMetadata - Name Input
Send Email ActionEmail Headers - Name Input
Send to REST Service ActionCustom Headers/Form Values - Name Input
Send to SOAP Service ActionCustom Headers - Name Input
Set Project PropertyCustom Property - Name Input
SmartIQ Prepare Form ActionValues - Name Input
WorkflowDescription
StateDue Date - Days After
StateSubmission - Submit Button Text
StateAfter Submission - Submitting Text
EscalationAll