Filter issue

Hi All,

I am binding my all records to Table Widget. But when I select some value from DropDownList how do I pass this value to that aggregate? I am trying to us "filter" but filter is not mandatory at first load. 



Below table has many records but when I select Leave Type from DropDown I need to Filter it. How do I pass this value to that aggregate?


Solution

Hi SP_india,


First save the selected value of the dropdown in one variable:


Then use this variable to filter the agregate of the table:

This filter means that if none option of the dropdown is selected then show all results ( LeaveTypeIdentifier = NullIdentifier() ) if one option is selected then it filters by that option ( Reason.LeaveTypeId = LeaveTypeIdentifier )


To finish you just need to refresh the data used in the table. You can use one action in the onChange event of the dropdown.


I attached an example.


Hope it helps


Regards,

Miguel Chaparra

Solution

Miguel Chaparra wrote:

Hi SP_india,


First save the selected value of the dropdown in one variable:


Then use this variable to filter the agregate of the table:

This filter means that if none option of the dropdown is selected then show all results ( LeaveTypeIdentifier = NullIdentifier() ) if one option is selected then it filters by that option ( Reason.LeaveTypeId = LeaveTypeIdentifier )


To finish you just need to refresh the data used in the table. You can use one action in the onChange event of the dropdown.


I attached an example.


Hope it helps


Regards,

Miguel Chaparra

 Hi Miguel,

After filtering I got no records which I expect both records to be displayed


But when I select the leave type then it filtered the correct records

Hi,


Supposing that your dropdown variable is "LeaveType" the filter should look like this:


LeaveType = NullIdentifier() or Leaves.LeaveTypeId = LeaveType 


Tell me if it works

Miguel Chaparra wrote:

Hi,


Supposing that your dropdown variable is "LeaveType" the filter should look like this:


LeaveType = NullIdentifier() or Leaves.LeaveTypeId = LeaveType 


Tell me if it works

 Yes , thanks it is working fine now

 

SP_India wrote:

Miguel Chaparra wrote:

Hi,


Supposing that your dropdown variable is "LeaveType" the filter should look like this:


LeaveType = NullIdentifier() or Leaves.LeaveTypeId = LeaveType 


Tell me if it works

 Yes , thanks it is working fine now

 

 

You are welcome :)

Happy that you got it solved!


Regards,

Miguel Chaparra