pass list items from list view to action button

0
Hi All, I have a listview with a microflow data source. The microflow returns a list of two elements. I'm allowing the user to make changes to those list elements/objects. Then, I have an action button, inside list view, which should take this list as the parameter and save the changes made. The issue is when I'm passing the list, I'm getting invalid parameter error. The action button is calling a microflow, where I can pass only an object, not the list. I'm confused with the way listview works. Does listview not allow to pass a list to an action button inside it? I don't want to use data grid, as that will give a completely different look to my app. Please, help me how I can simply display two list elements, allow editing and then pass those changed value to a microflow, called by an action button.   Thanks!
asked
2 answers
0

Instead of having your microflow accept parameters, can you retrieve the list again? The same way you are retrieving your list in your data source microflow. 

answered
0

Vertika,

An action button inside of a Listview can have 0, 1 or 2 parameters.  The parameters that can be passed to the microflow are the object you are on (the row in the ListView) and the enclosing entity of the ListView (if the Listview is enclosed in a parent entity, for instance inside of a Dataview).  You cannot pass the list of all objects in a Listview to an action button inside of the Listview.

As Austin suggested, you could have the Save button outside the Listview and retrieve the objects in the Listview again and then commit them.  The potential issue with this approach is if you retrieve these objects from the database using XPath (as opposed to using an association), you will lose the changes that have been made.

Another approach would be to create a small microflow that commits one object of the type you have in your Listview.  Then make that an onchange microflow for each of the input fields in your Listview (text boxes, radio buttons, etc.).  In this way, changes will be saved as you go along, and you won't have a need for a Save All button.

Hope that helps,

Mike

answered