Interaction between onChange and buttons

0
In a form, I have certain input fields which trigger logic using an onChange microflow. Part of this logic is a validation, to check if the entered value is valid. In the same form, on the save button, there is a validation on all the input fields to check if the input is valid. Both of these validations show a blocking popup message to the user, giving the reason why the input is not valid. This situation leads to an issue when a user enters a new value in an input field which has an onChange microflow and clicks the save button without leaving the input field. The validations are executed in the correct order (onChange first, save button second), but now there are two blocking popup messages. The preferred solution would be to not trigger the save button if the onChange logic detects a validation error, but I can't really think of a way to make this work. How do you deal with a situation like this? [edit] The actual checks can be anything, but let's say they are as follows: The onChange microflow checks if the date in an input field is valid (e.g. more than 30 days in the future) The save button validates if all fields have a value (i.e. are not empty). Both of these microflows have Abort on validation errors set to true, although there are no validation errors: we created custom logic to validate the input and show popup messages.
asked
2 answers
0

Hi Rom,

If i understand correct and there are two things you want to achieve. 1) check whether the data is syntactically correct or not. 2) check whether the entered information is valid or not.

For first is the onChange and for second is the save button. In the onChange microflow settings may i ask what is the option which has been selected for the "Abort on validation error".

Thanks

answered
0

Rom, why do you do a double check? In the custom save you could remove the check because the check is already done in the on change microflow. Unless there is some other way to change the field data you could safely do this. And if there is an other way to change the data you just have to make sure you that you do a check there also.

Regards,

Ronald

answered