Is it possible to change the default value (stored) of an attribute in an entity by a Microflow?

0
Hi there, we are building a Mendix APP and we want to change the default (stored) value of an entity on the fly. By using the "Retrieve" Widget we can get an object of the entity, as shown in the screenshot. Of course, we can change the value inside this object, but it doesn't reflect on the global entity itself.  We tried to hack the entity via MXModelReflection.MXObjectType in J...and we can get information of all the entities because Mendix provides getter methods to access them... However, no setter methods are available to be used to change the (stored) values.   Thanks in advance.  
asked
1 answers
0

Hi Haoyu Ren,
Yes, it is possible to change the default value of an attribute by microflow.

If I am not wrong, in your case you are trying to change the value of Enumeration Attribute from Select Boards Entity. everything is fine except one thing, you are passing a String Value to enum value in the change object ( if my Assumption on ur case is right). You have two ways to set the value, Create an  EnumVariable $SPARQlQuery which matches the Enum attribute in the entity, and inside the create Variable put an if-else condition on the string Value NewSPARQlQuery and match set the matching enum value and then Set the $SPARQlQuery in the change object od directly place the if-else logic in the change object.
I would prefer first on for easy understanding.

Let me know if this helps. Good luck !!

 

answered