Toggle menu

helper.querySubmissionActionIdentifier()

Returns the identifier of the button that was pressed to trigger the page submission.

This function currently only supports buttons generated using the NAVIGATIONBUTTON Handlebars helper as only these buttons have extra identifiers.

It queries the identifier of the button that caused submission of the current page.

Arguments

None.

Returns

String. If a button doesn't have an identifier then it returns "".

Examples

Simple Return

Given the following handlebars template:

{{NAVIGATIONBUTTON action="NEXT" label="Go to Page 2" pageName="PAGE2" identifier="MYIDENTIFIER" index=0}}

The function would return "MYIDENTIFIER-0".

Iterating Over Lists

This template generates a table, each row with a navigation button.

<table class="icmformdata__table" width="100%" summary="Projects">
    <tr>
        <th>QuoteID</th>
        <th>Description</th>
        <th>&nbsp;</th>
    </tr>
    {{#each .}}
        <tr>
            <td>{{QUOTEID}}</td>
            <td>{{DESCRIPTION}}</td>
            <td>{{NAVIGATIONBUTTON action="NEXT" label="Details" pageName="DETAILS" identifier=this.QUOTEID}}</td>
        </tr>
    {{/each}}
</table>

A script action could be used to query the button that was pressed:

function (helper, processor, props, context) {
    helper.setVariable("QUOTEID", helper.querySubmissionActionIdentifier());
  return true;
}

Last modified on September 13, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon