Form activity: How to refresh Data Grid on button click?

Hi there,

We’re using the Forms activity to display the results of a search in a data grid on the form. The data table passed into the form activity will contain a full list of records but by default we will only show the first 6 records. We need to provide the ability to do an advanced search if the default search doesn’t provide the desired results. I’ve added a panel to the form with a start and end date and a “Search” button. The idea is the user enters the new criteria, clicks on search and the results are updated in the data grid. All the search will do is filter the existing data table to show the results.

What I haven’t been able to figure out is HOW to refresh the data grid after the Search button is clicked.

Help!!

Thanks,

Carlo.

Hy @carlor,

Please check my workflow, there you will find all your answers, I have tried to use all functionatilites of the Forms.

UiPathForms.zip (61.8 KB)

If you have any questions please let me know.

The only thing I ask you to like my post and mark my answer as a solution, it helps me.

Regards

1 Like

Hi William,

Thank you for your zip file. It has helped a lot, however, it appears we are having a similar problem: the grid is not being refreshed properly. In your example, when you perform “Search Employees” for FileB you get 3 results and the form displays the results properly. When you then search for FileA, you find 1 result and the result is displayed. Unfortunately, the remaining rows for FileB are not removed. In other words, the grid contains:
Row1: FileA result
Row2: FileB result (left over)
Row3: FileB result (left over)

Is there a way to make sure the grid is completely cleared so that it only shows the results of the latest search? i.e. display only the contents of the updated DataTable passed in. My workflow is running into the same issue.

Also, in my workflow, after I click on my search button, the DataTable comes back empty if I have it set to In/Out in the Collection parameter.

Thoughts?

Thanks,

Carlo.

Hy @carlor,

Glad I could help you, I would ask you to like my post, it helps me.

I agree with you I saw this problem you mentioned, I do not know what to do about it :frowning:

I at least hope it gets fixed in the next versions.

Regards

AARGH! Anyone else know of a solution? We have to deliver to the client shortly. I don’t think it can wait for a new release.

Thanks,

Carlo.

Have you found a solution? I’m having the same problem.
I’m using edit grid so that users can provide input, then writing the provided input to a new datatable and processing it, then deleting the rows from the datatable that is linked to the edit grid. However, the input doesn’t dissapear on the form when it’s deleted from the datatable.