Microflow Validation of at least one filled field in a form
0
Hi All, I'm just new in developing apps. I already searched for an answer in the previous askes questions, but i could not find it. The save button needs to validate before committing, if at least one field in the form is filled-in (not all fields need to be filled). How do i set up such a microflow. Is it possible to get a step by step explanation?
asked
Redjen Biharie
2 answers
0
Create a microflow with input parameter the object (entity) you need to validate
Add a decision action with an expression checking if any of the fields has a value
Example expression:
$Entity/Geneesmiddel!=empty or
($Entity/Vorm!=empty and trim($Entity/Vorm)!='') or
($Entity/Kleur!=empty and trim($Entity/Kleur)!='') or
($Entity/Opschrift!=empty and trim($Entity/Opschrift)!='') or
($Entity/Barcode!=empty and trim($Entity/Barcode)!='')
It evaluates to true if any of the attributes contains data, it’s false if all fields are empty
Add a validation feedback or show message to inform the user he needs to fill in at least one field