Action App check box value binding issue

Hello Everyone,

My Use Case:
First I need to read the excel file. The file contains three columns (InvoiceNo, VendorName, InvoiceAmount).Additionally, I’m adding another IsApproved column to the dataTable as boolean type. Then I’m passing the dataTable to UiPath Action App through Input property. In the UiPath Action App I using edit grid control to display the DataTable and changing the column of IsApproved to checkbox. After selecting the appropriate checkbox related to the row. I need to return the whole data including the IsApproved column from the action app and write it in a new excel file.

I’m my edit grid data Source to action app input property(where i’m passing the dataTable from studio).

My Issue:
I’m not able to update my checkbox in action app. Whenever I loose the focus the checkbox resets to default value.

Hi @Prakash-P

Welcome to the Community,

Inputs are one-way and should not be modified. Use local variables to manage state and return data using outputs.

If solution helpful please mark as Solution, Happy Automations with UiPath.

Thanks

Hi @Prakash-P

Input properties are read-only by design.Any user edits must be written back to a local variable or Output-bound variable, otherwise the UI refreshes with original data.
So, Basically Edit Grid needs local variable binding, then Enable Update Data Source on Change, then Return updated data via Output property.

Apps - Binding an action to app controls
Apps - Edit Grid
Apps - Use DataTable with Table and Edit Grid controls

Hi @MohammedShabbir , @nishiijain2000

I’ve created a local app variable and create a rule in the event tab of the page. when the page is loaded. I’m saving the data source value to local app variable. when using the local app variable in the edit grid the values are not populating.

@Prakash-P

please check above points:

  • Create the local variable with default value = Input DataTable in the Variables panel (not in page load event).

  • Bind Edit Grid to this variable.

  • Handle OnChange for updates and return via Output.

Hope it helps

@nishiijain2000

In UiPath Apps, we can only create variables; we cannot initialize them with a default value. Values can only be assigned during the Page Load event. Is there any other work around for this?

@Prakash-P

check this

InvoiceApprovalAppWorkflow.1.0.2.nupkg (36.8 KB)
InvoiceApprovalApp.uiapp (113.3 KB)

As you suggested, I tried the above approaches, but I couldn’t find a workable solution. I’m attaching my workflow and Action App—please review them and let me know how I can achieve this.

@Prakash-P , sure will check and update you

Hi, @Prakash-P

Your checkbox resets because Row modified event isn’t updating the DataTable.

Edit Grid Setup:

Data source: Processes.InvoiceApproval.dtInvoices.ToListSource
IsApproved column → Edit mode view: Checkbox

Set Value rule:

Item: Processes.InvoiceApproval.dtInvoices

Value: Processes.InvoiceApproval.dtInvoices.UpdateRowAt(MainPage.EditGrid.RowIndex, MainPage.EditGrid.SelectedItem)

Studio: Pass dtInvoices as In/Out argument. Changes will persist after Action App complete.

@Prakash-P
Try this

  1. Add a Checkbox List control in the Action App
  2. Bind its Items Source to an IN argument of type List<String>
  3. Set Label Field and Value Field to value
  4. Create an OUT argument of type List<String> and bind it to CheckboxList.SelectedItemsstrong text.

@MohammedShabbir @nishiijain2000 @arjun.shiroya

Thanks to all of you. Now, I’m able to bind the value. :slightly_smiling_face: :+1:

1 Like

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