Multi-select records from a section list and passing to a BP

Now that lists have a multi-select feature, how can one access the DataTable_SelectionState for that list and pass it to a BP?  The available button actions don't seem to have an option specific to sections and I'm not yet seeing any samples out there on how to do it in code.  

 

Has anyone tackled this yet?

Like 1

Like

4 comments
Best reply

Hi Jeremy!

 

You can use the following in a request handler for the action buttons for the list - this will return an array of the selected Id values: 

const selectedIds = (await request.$context.DataTable_SelectionState).selected;
// selectedIds will be an array of Id's for any selected records

As for getting them to a process, you could pass in as a string to a param or execute the process separately for each Id. See here for executing a process, if needed. 

More info here: https://customerfx.com/article/getting-multi-select-records-from-a-crea…

Ryan 

Hi Jeremy!

 

You can use the following in a request handler for the action buttons for the list - this will return an array of the selected Id values: 

const selectedIds = (await request.$context.DataTable_SelectionState).selected;
// selectedIds will be an array of Id's for any selected records

As for getting them to a process, you could pass in as a string to a param or execute the process separately for each Id. See here for executing a process, if needed. 

More info here: https://customerfx.com/article/getting-multi-select-records-from-a-crea…

Ryan 

Ryan Farley,

This is exactly what I was looking for.  Thanks Ryan!

This should be available without a line of code.

Franck Lehmann,

 

I believe that's coming in a future update.

Show all comments