1
0
-1

How can I use the value of a form field in the filter extra conditions field of a check box on the same form?

I have a check box whose values are populated from a table (app_fd_options) and it contains fields for label (c_label), value (c_value) and grouping (c_option_1).  I want to use a second field (c_option_2) to further filter the displayed options based on the user's selection in a checkbox on the same form (option_2).

In essence I am looking for the HQL syntax that does this: 

c_option_2 LIKE %<value of form field option_2>%.

I have tried %{option_2}% (as you would use in a custom form load or store binder):

c_option_2 LIKE %{option_2}%

but that doesn't work.

If I use static text such as:

c_option_2 LIKE %ryan%

It works as I expect, but I want to get the text (in this example 'ryan') from the value attribute of the form field (option_2).


Examples:


app_fd_options data:

Example form:

Selection checkbox options binder (database wizard):

Selection checkbox extra conditions (with static text that works but not what I need):

The result that I want is for the grouping to show the options (films in my example) filtered by 'Option 1' first and then further filtered by 'Option 2'.

In this contrived example, choosing 'War' (value 'war') and 'Tom Hanks' (value 'hanks') would offer 'Greyhound' and 'Saving Private Ryan', 'Romantic Comedy' (value 'romcom') and 'Meg Ryan' (value 'ryan') would result in the display of 'Sleepless in Seattle', 'Working Girl', 'You've Got Mail' and 'When Harry Met Sally'.

Choosing 'Romantic Comedy' and both 'Tom Hanks' and 'Meg Ryan') would offer 'Sleepless in Seattle' and 'You've Got Mail'.

Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi,

      i believe this can be achieved by using this : Multiple Dynamic Cascading Drop-Down List

      This can help you to dynamically change the options/selections of a select box/radio button/radio based on multiple form field values within the same form.


      Hope this helps!

        CommentAdd your comment...