Skip to main content
OutSystems

How to dinamically change the source of a Table Records widget

Question

How do I display different record sets on a Table Records widget depending on conditions in the page?

Answer

Use a local variable of type Record List with the same record definition as your aggregate. Bind the variable with the output of the aggregate and rebind when necessary.

This solution impacts performance.

For example, for a list of users, create a local variable of type User Record List, as shown below:

unnamed.png

Then, bind the list of users GetUsers.List to your variable. Or, depending on your needs, bind a different list of users to your variable.

unnamed (1).png

On the Table Records widget, select your local variable as Source Records:

unnamed (2).png

You can't change the source of a Table Records widget dynamically.

  • Was this article helpful?