5
Views
3
Comments
Solved
Retrieve all values from dropdown at start
Application Type
Reactive

Hi,

I'm making a dropdown, that filters an aggregate with a client variable (which holds the dropdown choice).

It's working well, and filtering, but i want to start that value with the "empty text" option and showing all the results in the aggregate in a Table.

It's a reactive web app.

Thank you

mvp_badge
MVP
Rank: #75
Solution

Hi Ricardo,

For this use-case, you will have to follow the below mentioned points..

Steps to Follow:

1) Set the default client variable (which holds the dropdown choice value) with nullIdentifier() or empty string value (as per the Dropdown options value data type)

2) In the Aggregate filter section the filter condition should be Or conditioned

i.e. Client.DropdownVar = NullIdentifier() or Client.DropdownVar = Entity.Attribute

On the first instance of the aggregate call/fetch, as the client variable referred in the filter condition holds the default  value i.e. NullIdentifier(), the first part of the filter condition will gets satisfied (i.e. yields Truthy) hence the second phase of the OR condition is ignored and the Aggregate query will return the complete result-set without any filter condition.

3) Also add the Empty Text property value for the Dropdown widget

4) Make sure to reset the Client variable to default value when it's required.


Hope this helps you!


Kind regards,

Benjith Sam

Rank: #5607

Great! Thanks for the help. Worked like a charm :)