KB-1098 Input variables named after SAIL keywords don't take the value that is assigned to them

Symptoms

Input variables to SAIL interfaces sometimes don't take the value that is assigned to them.

An example of when this would happen is shown below,

a!buttonWidgetSubmit(
label: "Submit",
style: "PRIMARY",
value: "CLICKED",
saveInto: ri!submit
)

Cause

If the input variable is named the same as a keyword and the assignment is done in a SAIL component where the keyword is present, the assigned value is not stored. Instead, the value of the keyword is stored into the variable.

The value of ri!submit will become True when the submit button is clicked. This is because submit is a keyword of Boolean type for the Button component. Similar behavior will be seen if we used ri!style instead. In that case, we would see the value PRIMARY.

Action

To resolve this issue, perform one of the following:

  • Use a different name for the input variable that isn't a keyword for that component.
  • Use the a!save function to do the assignment instead of doing simple assignment. For the above example, that implementation would look like this
a!buttonWidgetSubmit(
label: "Submit",
style: "PRIMARY",
value: "CLICKED",
saveInto: a!save(ri!submit, save!value)
)

A list of each of the keywords can be found in the SAIL Components page.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: February 2017

Related
Recommended