268
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

2021-03-18 21-03-15
Benjith Sam
 
MVP
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

2020-12-06 19-10-43
Ricardo Cardoso

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

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Ricardo.

Glad to help you :)


Kind regards,

Benjith Sam

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