Section validation running before button with associated validation group is pressed.

We are using Appian 16.2 and I noticed by creating a small test case that section validations run before any buttons are pressed regardless of whether it has an associated validation group. The test case I am using is copied below. Am I doing something wrong here or is there some other way to make a validation only trigger when a certain button is pressed?

a!formLayout(
  label: "Test",
  firstColumnContents: {
    a!sectionLayout(
      label: "",
      firstColumnContents: {},
      validations: "Test",
      validationGroup: "SUBMIT"
    )
  },
  buttons: a!buttonLayout(
    primaryButtons: {
      a!buttonWidgetSubmit(
        label: "Save",
        value: "save",
        saveInto: ri!button_value,
        validationGroup: "SUBMIT"
      )
    }
  )
)

  Discussion posts and replies are publicly visible

  • When you're typing out the validations parameter in SAIL, it doesn't say this but you should use a!validationMessage() for the validations parameter if you want to control when the validation error shows ("REFRESH" being the default if not provided).

  • Yeah, I have used that as well. That works for displaying the message after clicking the submit button, but my use case involves some database driven activity to determine the validation message. What I am really trying to do is find a way to not run any validation code, including the determination of the message, until after a submit button has been clicked. I noticed that there is a showWhen parameter in the validationMessage function of newer Appian versions, but it looks like that is not available in 16.2. Is there some way to emulate this functionality in 16.2 or at least address my use case?