Dropdown with a microflow data source

I have a situation where I want a drop down to be filled by a microflow (calling a web service getting a list of customers). When I select a customer from the drop down I would like to execute an on change event that has the selected object AND the object from the dataview the drop down is in as input objects. Obviously we could create a custom widget, but it would be great if there was an easy way to do this without custom widgets....
2 answers

One thought:

  • create a helper entity to contain the results of your webservice call (this entity could contain information needed to make further webservice calls for the selected Customer, if necessary)
  • create a one to many association between your parent entity and the helper entity
  • on your page, make a dataview for the parent entity and put a reference selector for the helper entity
  • now when the on change handler fires for the reference selector, you have a way to get everything you need (I think) because you've got the dataview entity and the helper entity, and the helper entity has pointers to the web service object if needed

Sadly, it is not possible to pass two objects to a microflow via a custom widget, the xml configuration doesn't have that option. So thats not gonna work. You could build around it with a transient object with references to the other objects, so you can only send over the one object and retrieve the others.