3
votes

Oracle APEX QUESTION: I have a report parameters region on my Oracle APEX page with two separate checkbox items (P1_CHECKBOX_1 and P1_CHECKBOX_2) with options (A, B, C, D) and (E, F, G, H) respectively.

The user clicks a 'Submit' button to generate the various reports below based on the selection in the checkboxes.

I want to show a certain report region only if 'C' is selected in P1_CHECKBOX_1 OR 'F' is selected in P1_CHECKBOX_2. I have tried a few options through the region Server-side Condition and creating a Dynamic Action (using Item in List). I can't even seem to make the region show based on the P1_CHECKBOX_1 selections, let alone adding in the second condition with P1_CHECKBOX_2.

Can anyone help / provide an example when doing something similar?

2

2 Answers

1
votes

Try to build a "SQL Expression" server side condition:

   instr(':'||:P1_CHECKBOX_1||':',':'||C||':')>0 
or instr(':'||:P1_CHECKBOX_2||':',':'||F||':')>0

or maybe an "Exist" server side condition:

select 1 from dual 
 where instr(':'||:P1_CHECKBOX_1||':',':'||C||':')>0 
    or instr(':'||:P1_CHECKBOX_2||':',':'||F||':')>0
1
votes

This PL/SQL expression in the server-side condition should do it:

':'||:P1_CHECKBOX_1||':' like '%:C:%'
or
':'||:P1_CHECKBOX_2||':' like '%:F:%'