condition on column in grid

 I need to put a condition on one of the columns in an editable that I'm using.  The code that I'm currently using is not working.  See the code below.  There is a dropdown field in the grid and I have the condition on the 'required' attribute in bold.

 

=a!gridRowLayout(
  contents: {
    a!textField(
      label: "Application Name" & ri!indexRoles,
      value: ri!itemsRoles[ri!indexRoles].applicationName,
      saveInto: ri!itemsRoles[ri!indexRoles].applicationName,
      required: false,
      readOnly: true
    ),
    a!dropdownField(
      label: "Approved",
      labelPosition: "ABOVE",
      placeholderLabel: "--- Select a Value ---",
      choiceLabels: cons!YesNo,
      choiceValues: cons!YesNo,
      value: ri!itemsRoles[ri!indexRoles].approved,
      saveInto: ri!itemsRoles[ri!indexRoles].approved,
      required: if(ri!rejectApplicationsYN = "Return to Customer",true(),false()),
      validations: {}
    ),
    a!imageField(
      label: "delete " & ri!indexRoles,
      images: a!documentImage(
        document: a!iconIndicator("REMOVE"),
        altText: "Remove",
        caption: "Remove " & ri!itemsRoles[ri!indexRoles].applicationName,
        link: a!dynamicLink(
          value: ri!indexRoles,
          saveInto: {
            a!save(ri!itemsRoles, remove(ri!itemsRoles, save!value)),
            /* When modifying the size of the array used in a!applyComponents,  */
            /* make the same change in the "token" array variable               */
            a!save(ri!itemsTokenRoles, remove(ri!itemsTokenRoles, save!value))
          }
        )
      ),
      size: "ICON"
    )

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data