Call a microflow from JavaScript Action with input as xpath and expecting List of objects

0
Hi, I have a requirement where i need to call a microflow with some xpath and receiving a list of objects as output. I go through this documentation Mendix 8 Client Documentation: Namespace: data and find this  code.    Calling a Microflow expecting a list of entities, using an XPath query(showing object, list, string, boolean etc) mx.data.action({ params: { applyto: "set", actionname: "MyFirstModule.GetFavoriteFood", xpath: "//MyFirstModule.Cat", constraints: "[id=281530811285515 or id=281530811285506]" }, origin: this.mxform, callback: function(obj) { // expect single MxObject alert(obj.get("manufacturer")); }, error: function(error) { alert(error.message); } }); But i am not getting how to create a microflow which will accept xpath as query and return that data. As in the input parameter it isn't showing any option to choose xpath     Could someone please help me in how to configure the microflow?. Thanks in advance
asked
2 answers
0

Can it be that it sees the xpath as a string(see the quotes " "), then you could go for the string option at the parameter data type?

answered
0

First look up the entity in your domain model:

 

image.png

 

Second, create a microflow with a retrieve action

image.png

Third fill in the retrieve

image.png

answered