How can i use list filter (client action) to display data
Question
Application Type
Reactive

How can i use list filter (client action) to display data

in screen one i create client action ,inside this client action i add filters list as like this image 

i need display this list in screen1 

how can i do that 

as like at Attachment oml

List1.oml

mvp_badge
MVP

Hello there Andrew,

Hope you're doing well.

If you want to filter directly the List returned for the Aggregate, you don't need to create an action for that.


You can apply a Filter in the Aggregate, like this:


After that, if you want to display this list in the screen, you just need to Drag-And-Drop the Aggregate to the screen.

Please consider the OML in attachment.


Hope that this helps you!


Kind regards,

Rui Barradas

List1.oml

I know it, but I create this type  because I used it in other task

mvp_badge
MVP

Then you can create a Local Variable like this:


Then do a ListAppendAll action after the filter to pass the filtered List to this new Local Variable:


And after that you can use the new Local Variable in your screen as you like.

And I need display this list in screen 

Can you upload oml after finish

mvp_badge
MVP

What is the exact moment where you want to apply this filter?

Is it associated to a filter button from the screen?

Hi Andrew,

the values filtered are now available in the action named ListFilter. You can call it from the UI.

Regards

How I call it 

Create a local variable in the screen with the type of the aggregate you filtered and assign it.

How can I display this list in the screen 

In the Source field of your table/list you select the local variable that received the filtered list.

Here's Rui oml with the changes you need.

List1.oml

I don't to creat table and filter in side agreget, 

I need create list which is display data, this data come form filters list 

Just create a list widget on the screen instead of the existing table and assign the local variable with the filtered list.

mvp_badge
MVP

Andrew,

What exactly do you want to achieve? Can you be more specific?

Right now we're just guessing what you pretend to achieve.

Hi @andrew mahfouz,

I understand the issue you are encountering. The ListFilter is not filtering the aggregate list when used in a Client Action. Using it in a Server Action works for your scenario. That may be your way forward.

Please check out the attached oml.

Screenshots of my test: 

I created some test data in the List screen.


The filtered list in Screen1:

Hope this helps,

Regards,

AJ

List1v2.oml

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