Filter Datatable by Column Name in UiPath Apps

Hi everyone,

Can I get assistance here.

I am processing a document like this:
[image]

I have an App for approval, in the table, I want to display an “Amounts” Column based on the selected period. I have referenced the selecteditem as source for the column,
[image]

However, during testing, the table does not get refreshed after selecting the period
[image]

Your help would be greatly appreciated.

@Nasiphi_Mvango

you have to use events on the dropdown…basically once the dropdown is selected event gets triggered and filters the input datatable

the source would be the filtered table…

cheers

The source of the grid is the datatable from a process.

We want to choose which column goes into the column displayed as ‘Amount’ from the period chosen from the dropdown.

The other columns data has been correctly populated as they referenced the column as it is from the table.

@Nasiphi_Mvango

assign the datatable to an app variable

then assign the app variable as source to grid

in events menu of dropdown select period …create an event and assign the filtered datatable based on value from dropdown to the app variable

cheers

I had that. It’s not populating the column.

Here are the events of the dropdown


I extract the columns including the one selected.
Processes.NLP_ACReview_byApp.dtIncomeStatementItems.DefaultView.ToTable(False, “Category”, “Description”, varSelectedColumn, “Mapped Field”)
Then I rename the selected column name to ‘Amount’.

The source of the grid is the app variable, with the column sources as their column name


However I am still not getting values for the ‘Amount’ column


I have the same logic in studio so I can see the output of the datatable, and the table is fine.
the only thing I am thinking is that the issue is with the column source, I don’t know how though.

@Nasiphi_Mvango

are you trying to filter the dource based on dropdown or based on dropdown you want to change the column to be displayed?

selecteditem will give full source …you need to mention the column anme after that selecteditem.Amount or whatever column name is

cheers