How to bind combo box values to a input

How to bind combo box values to a input

  

I have a combo box and an input widget. I have a condition for search filter, like if age less than given input, it should display the list of all the people below that age. The combo box will be having all such conditions like "Less than", "Greater than", "Equal" and "Not equal". How i can bind all these values for combo box and input widget.

Please find the attachment below for clear understanding of my doubt.

Please suggest some ideas. 

Thank you.



Hello Melody.

You are thinking in the wrong dirrection.
You want to filter an aggregate results, right?

So, I imagine that you have the combox options in a static entity, and the combo box variable is of type this entity identifier, while the input has a variable that is, like, integer or decimal.

Let's call them Option (for combo box variable) and Value (for input variable).

In the aggregate, the simplest way is to do something like this:

Option = NullIdentifier()
OR
(
    Option = Entities.YourStaticEntityWithOptionsNameHere.Equals
    AND
    YourEntity.Age = Value
)
OR
(
    Option = Entities.YourStaticEntityWithOptionsNameHere.NotEquals
    AND
    YourEntity.Age <> Value
)
OR
(and so on)

Not very "flexible", but is easy to implement.
Cheers.