Microflow Validation of at least one filled field in a form

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?
2 answers
  1. Create a microflow with input parameter the object (entity) you need to validate
  2. 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
  3. Add a validation feedback or show message to inform the user he needs to fill in at least one field

See docs for how to work (sub)microflows and validation microflows: https://docs.mendix.com/howto8/logic-business-rules/extract-and-use-sub-microflows/

I advice you to do some training paths to get more familiar with Mendix


Hey Stephan,

It works, thank you for your input an help ;)

Is it possible to do a similar check on a Boolean type attribute?