Selecting Bulk Items in a Custom List Control and Pass to an RPA workflow

Hi Everyone,
As the title suggests, I would like to know if there is any workaround to perform this since I understand it’s not possible in the current state of the control.

The ideal function required is the user should be able to select items from a custom list via a checkbox control in the template and only those that are checked will be passed to an RPA workflow once a button is clicked.
However, as of now as per product team this is not possible yet, but they are working on another type of control to specifically do this.

Below is the response from the product team via insider portal:

  1. Custom list supports single selection and there is no multi-select available in the custom list as of now
  2. We can accomplish the same using RPA process, by following. In the custom list, have a checkbox field as the first element. The customer will select/unselect rows and you send this entire custom list to the RPA process, where you navigate through each item and in the list and process items that are checked
  3. The above method is cumbersome and not straightforward and requires RPA process in updating entities
  4. We are currently working on building a new grid control, which would solve all the requirements which you have mentioned

Question 1:
How do I achieve this “send this entire custom list to the RPA process, where you navigate through each item and in the list and process items that are checked”? I already tried passing the parent container of the custom list or the custom list itself but to no avail.
2022-03-11_15h50_39
image

Question 2:
Is there any other workaround as of the moment aside from the above mentioned steps?

Thanks in advance!

Hey @zell12!

The key to achieving this is understanding that ‘Data source’ fields are 2-way bound, just like the ‘Value’ property of a textbox. If that sounds complicated and you’re asking, “what does that even mean!?”, that’s a great question… In a nutshell, both these control properties can update the root data that is bound to that control. Here’s a simple example: Add a label and a textbox to the canvas, then create an app variable. Assign the both the textbox’s Value binding property and the label’s Text property to the variable.

When you preview your app, you’ll find that when you change the value of your textbox, the app variable is updated as well.
2-way-binding

Data source and Value are different than 1-way bound fields like ‘Text’ on a label, which only displays data and cannot update it.

The solution

While we don’t have a way to “select all” (except through the use of a workflow) we can definitely tackle your use case for passing selected items. I’ve created a simple workflow and an app (attached here) - feel free to download these and follow along while I break down how we’ll get this to work.

Multi Select.zip (2.8 KB)
Custom List Selection.uiapp (153.0 KB)

The workflow

The workflow is simple, consisting of a few arguments and a bit of logic to let us reuse a single workflow for this end-to-end example:

  1. out_DataTable - a dummy data table for the purposes of this example
  2. in_SelectedItems - a DataTable that accepts a modified version on out_DataTable with selected items.
  3. filtered_SelectedItems - the product of in_SelectedItems once it is actually filtered

What’s important here is that I’ve added a column (called Selected) as a non-nullable Boolean. You’ll see why in a minute.

The app

Now for the exciting part: The sample app! This app contains two custom lists (one to interact with, and one to visualize filtered results) and a table (to visualize the 2-way binding). When the app loads, it runs the process, which returns our dummy list of data.

image

We can check some of these boxes, which are Value bound to the column called Selected inside of our custom list, which has a Data source of out_DataTable. Now remember what we learned earlier, Data source and Value binding are 2-way, so as we interact with the app and check these boxes we’re actually updating the values of out_dataTable in memory.
2-way-custom-list

Now to actually pass this updated value to the process… On the Clicked On event for the “Run” button in the app, I’ve used the ‘input override’ field on the Start Process rule. This allows us to pass the modified version of out_DataTable back into the process as in_SelectedItems.

And just like that, we’re able to select items in a custom list that come from a process:
2-way-custom-list-e2e

Summary

I hope this helped! To recap, there are two key pieces of functionality to that make Apps extremely flexible when handling data from workflows:

  1. Value and Data Source are 2-way bound.
  2. Input override allows you to pass in objects from other sources (DataTable from Process, or Entity from Data Service)

Until next time,
Evan

p.s. I found a bug while running this sample app. The team is working on fixing it, but I’m curious if anyone will manage to find the same issue :slight_smile:

2 Likes

Hi @evan.cohen ,
Thanks for taking the time to provide a detailed response. I’ll check on this and provide feedback.

Thanks,
Russel

Yeah, the bug on the app is, even though the output Dt’s ‘selected’ value is binded to the checkbox, it only reflects the initial change and does not apply subsequent changes (i.e. clicking checkbox twice)
I also tried creating a variable to store the state of the checkbox (varCheckBoxSelection), and attaching a set value event (‘selected’ → varCheckBoxSelection) to the Value change even in the checkbox but it doesnt seem to also work.

image

In my app, the workaround I’m planning to do, is to build a string to store all the changes made, so that if check box is checked append ‘ADD’, if check box is unchecked subsequently append REM e.g. item1 ADD; item2 REM; item1 REM
Then it’s up to the workflow to process the checked items based on the logged checkbox state changes for each item ID.