DataTables Apps

I have a datatable that I want to pass to the App,

How do I reference it and bind it in the app.

Also if I want to select a value on the data grid I should be able to extract the values in variables for that line of item

try this approach

In UiPath Studio, create your DataTable in the workflow use the Create Form Data or directly pass the DataTable via App Input Argument then in the UiPath App, define an input argument of type DataTable.

In UiPath App → Go to Data Sources → Add UiPath Data Service or UiPath Process as data source then select your process and map the DataTable output to the App input.

Hello @Aki1111,

Follow these steps:-

  1. Convert DataTable → JSON in Studio
  2. Pass JSON as Output Argument to UiPath App
  3. Bind JSON to Data Grid as data source
  4. On Row Selected → DataGrid.SelectedItem["ColumnName"] to store row values
  5. Optional → Pass selected values back to Studio

Apps_Tables_Cheatsheet.uip (2.0 MB)

Try this app

1 Like


I have done that but encounting this issue

Config_Store_Update.Table.Value is a row object or table object, not a string and varSelectedStoreBatch is likely a String variable in the UiPath App so when you bind a Data Grid SelectedItem to a variable, you must extract the specific column value not the entire row.

So for this check the column name in your DataTable (e.g., BatchID, StoreName) in your Set Value → Value field, use: Config_Store_Update.Table.Value[“BatchID”]

Now it will store only that column’s value into the String variable.

Cheers

how do I bind a Data Grid SelectedItem to a variable?

Try this create a variable in the App then use Record type if you want the full row, or String/Number if you want only one column value then in the Data Grid Properties set the Selected Item property to this variable. And to access column values from the selected row, use: VariableName["ColumnName"]

Can I use an edit grid?

Yes you can use edit grid and here how you can
Add an Edit Grid control to your page then bind it to a DataTable or Collection variable. Then use For each row selection, use selectedItem property the same way EditGrid1.SelectedItem["ColumnName"]

I am trying to bind it but encountered this issue,

You cannot directly pass that try this: go to variables then add variable of type Record (for entire row) and name →varSelectedRow then bind Selected Item Property for that select the Edit Grid control → In Properties → Selected Item → set it to varSelectedRow.
Access Column Value and for this go to expression editor, use varSelectedRow["Batch"]

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.