Hi,

     I am working in a web application. The following in my scenario

I am using a combo box for filter. I have set the variable for combo box as plan identifier(PlanId). The combo box has the source list as values from a static entity(Plan). I have specified the special list as in the below image.

I have to filter the values based on the value from the filter. 

  1. If combo value is "Select a plan", I have to display all the records.
  2. If combo value is "No Plan", I have to display records with PlanId as nullidentifier
  3. Else, I have to display results based on the selected ID value from the filter

I need an expression to use as a filter in the aggregate for the above scenario. Can anyone explain how to do this?

Thanks,

Gowtham

Hi Gowtham,


Set

Value 1 =  -1

Option 1 = Select a plan


Value 2 = 0 (equal to nullidentifier() )

Option 2 = No plan


Now, in your onchange action just check below condition:

if the selected value is -1 then add all record 

if the selected value is not -1 then filter with the selected value.


Regards,

Gopal



Gowtham wrote:

Hi,

     I am working in a web application. The following in my scenario

I am using a combo box for filter. I have set the variable for combo box as plan identifier(PlanId). The combo box has the source list as values from a static entity(Plan). I have specified the special list as in the below image.

I have to filter the values based on the value from the filter. 

  1. If combo value is "Select a plan", I have to display all the records.
  2. If combo value is "No Plan", I have to display records with PlanId as nullidentifier
  3. Else, I have to display results based on the selected ID value from the filter

I need an expression to use as a filter in the aggregate for the above scenario. Can anyone explain how to do this?

Thanks,

Gowtham

Hi Gowtham,

You will have to use 2 variable for this, one for the Variable property of the Combobox, and another as Special Variable in that same Combobox.

In your logic you'll have to inspect both, keeping in mind that when you select an option on your Special List, the Variable will automatically be set to NullIdentifier.

Another thing is the values in the Special List. Use 0 and -1 lile Gopjal mentioned.

Thank you.

Best regards,

Paulo Moreira

Solution

Following Paulo suggestion (variable + special_variable) and values:

In filter

special_value = - 1 or ((special_value = 0 and your_entity.PlanId = NullIdentifier()) or your_entity.PlanId = variable) 

Solution