Capture Appian Default Validation

Hi,

I have  a link to be disabled depending on the values entered by the user. (Link should be disabled in case of any validation error).

I'm able to achieve the same for user-defined validations and not for Appian default ones.

For example, I have a date field. A user-defined validation appears if the user enters any previous date. The link could be disabled in this case.

On the contrary, consider the scenario where the user enters a text value into the date field,

an Appian default validation occur(as seen above). Is there any possible way to capture this so that i can disable the link based on that condition? Or is there any way to automatically nullify/empty the value when the user enters a text value into the date field?

PS: Appian Version used - 17.4

Regards,

Vaisakh Sekhar

  Discussion posts and replies are publicly visible

Parents Reply Children
  • I created a very basic test interface where you can set a local!variable as a Boolean, initialised to false, which controls whether the link is disabled or not; and in the Date field an a!save() that saves true to this variable if the value of the variable for the date field a value, and saves false if the value of the date variable is null. The effect is that the link is disabled and remains disabled until you enter a valid date.

    Here's the test:

    a!localVariables(
      local!isDateValid: false,
      {
        a!dateField(
          label: "My Date",
          value: ri!myDate,
          saveInto: {
            ri!myDate,
            a!save(
              local!isDateValid,
              fn!not(fn!isnull(ri!myDate))
          )
        }
      ),
        a!checkboxField(
          disabled: true,    
          label: "Is Date Valid?",
          choiceLabels: {"Yes","No"},
          choiceValues: {true, false},
          value: local!isDateValid
      )
      }
    )

  • Thanks Stewart!!

    Again, I wont be able to differentiate the scenarios 

    1. When the date field is empty

    2. When the date field is having an Appian default validation 

    as in both the cases, the local value remains false.

    The requirement for the link is that it should be disabled only when any validation error occur.(user defined or Appian default)

    The link should remain enabled when the field is empty.

    Regards,

    Vaisakh Sekhar