How to implement a logic similar to the refreshAfter field in a!dateField as we do for a!textField?

Requirement: How to implement a logic similar to the refreshAfter field in a!dateField as we do for a!textField? We would like the page to refresh when the DOB field is clicked again, and a different date is selected.

a!dateField(
label: "DOB",
labelPosition: "ABOVE",
value: ri!input.dob,
saveInto: ri!input.dob,
showWhen: cons!PARAMETER[2] = tostring(local!input),
required: true
),
a!textField(
label: "Address Line 1",
labelPosition: "ABOVE",
placeholder: "Enter Text ...",
value: ri!input.addressLine1,
saveInto: ri!input.addressLine1,
refreshAfter: "KEYPRESS",
showWhen: cons!PARAMETER[2] = tostring(local!input)
)

  Discussion posts and replies are publicly visible

Parents Reply Children
  • We have an application with a search feature that allows users to search by Name and Date of Birth (DOB).

    In the first step, I searched using the Name and DOB field and got some results. Now, I'm working with a different record, and this time I started by selecting the DOB field.

    The requirement is: as soon as the user clicks or changes the DOB field, the previous search results should be cleared automatically.

    For text fields like Name, we can use refreshAfter: "KEYPRESS" to trigger changes immediately. But for date fields, there's no such parameter.

    I need suggestions on how to achieve the same "auto-clear" behavior for a date field when it's clicked or changed.


  • +1
    Certified Lead Developer
    in reply to sanjuktab2257

    Appian will evaluate any logic as the user changed the value in the DOB field. A click alone does nothing. And this behaviour cannot be changed.