Refresh and filtering table if click button action
Question

Hello All,


I build an traditional web application and i have list table screen.

I want to have 2 button for filtering data from database and refresh a table.

The problem is, if i add an filtered aggregation from preperation and i call in table widget, a full data will not display when the screen is called first



Regards,

Kane.

In order to do that you can create local variables that will control the filter conditions. For example:




Then you control the values of the variables with an action that will have as inputs "IsUnder10" and "IsReset". Then for each button you call this action and define the variables values.

Example for the button "Age Higher 10".

Find attached the .oml with an example. If you have any further question feel free to contact me.


kanedemo.oml

HI,

Kindly share your filter condition in aggregates with us. It would help me understand more.

Hi,


Here my filter

Hi @Kane Loony 

So, I replicated your example, and you can achieve this by having 2 variables default as False. One for each button, being both booleans.

On the aggregate's filter you do something like this:

Variable1 = False or Test.Age < 10
Variable2 = False or Test.Age >= 10

Then when you click on the buttons, make them go to the same action, and there you will change the variables status (False -> True), refreshing the aggregate and the screen after.

You can observe this, on the following link:

https://joaoxensa.outsystemscloud.com/TestTraditional/Filtered_Screen.aspx?_ts=637592630808820853

Here, it's the aggregate filters

Here, is the action to change filter status.

You can add an integer from input and do something like (0:Reset; 1-AgeLower; 2-AgeBigger).

Regards

|João Ascensão


In order to do that you can create local variables that will control the filter conditions. For example:




Then you control the values of the variables with an action that will have as inputs "IsUnder10" and "IsReset". Then for each button you call this action and define the variables values.

Example for the button "Age Higher 10".

Find attached the .oml with an example. If you have any further question feel free to contact me.


kanedemo.oml

Hi @Kane Loony,

As per your problem statement, I created one sample module.

I attached one demo oml file with this post so you can check implementation.

You can also check using the below link:

http://personal-6qqoqcvk.outsystemscloud.com/FilterDemo/DemoUsers.aspx


Regards,

Narendra Bhangale.

FilterDemo.oml

Hi All,


Thanks for your answer, its very helpful for me, and my issue is solved :)


Regards,

Kane

Hi @Kane Loony,

Sorry to bother you but, Please can you mark the post as solution by which your problem resolved. So this will helpful to him and upcoming/newcomer community people will be face such issue.


Thanks and Regards,

Narendra Bhangale.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.