Microflow Validation of alteration of at least one filled field

1
Hi, In my form, all information is retrieved from the entity "geneesmiddel”. This form is used to alter existing information in this entity. I'm using this microflow, but it checks if the field has value. Maybe it's possible to expand this microflow to check if at least one of the fields has been altered before it's possible to save? I'm als having trouble how to use the right expression.
asked
3 answers
3

$Wijziging/VormValue != empty
or
$Wijziging/KleurValue != empty
or
ETC…

if returns true one or more values are changed, returns false if none of the values has been changed

 

//Edit//

 

You don't have an object of "Geneesmiddel" in your microflow, but an Object of "Wijziging"
The attributes are prefilled with the original values. This it becomes a lot harder. Because you need to retrieve the "Geneesmiddel"object in this microflow and comapre each attribute value like this
$Wijziging/Kleur = $Geneesmiddel/Kleur if true no change has made. If false, then it is changed.

Checking this in a single decision would lead to:

$Wijziging/Vorm = $Geneesmiddel/Vorm
or
$Wijziging/Kleur = $Geneesmiddel/Kleur 
or
...etc...

//Note//
In my opinion (without further knowledge of the case and app) this situation is something you don't want to do, unless REALLYYYYY needed (which is most of the time not the case)

 

answered
1

I tried this expression, it checks if the field has a value right? 

I added some screenshots, i don't know if i explained it in the right way

The screenshot shows an object of the entity "geneesmiddel" that can be selected.

When selected it fills the fields.

 The purpose of this form is to administrate changes in "geneesmiddel” properties, for instance "kleur”, "barcode” etc. It must not be possible to save this form, when none of the fields, have been changed, and at least one field should be changed before the form is able to be saved. 

answered
1

You may tray Retrieve the same Object from Database and than compare it with object from Parameter

XPath=> [id = $ObjParameter.id]

New Object name=> ObjDatabase

Decision like => $ObjParameter/changedDate != $ObjDatabase/changedDate

 

 

 

 

answered