Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to display all records by default in oracle apex when no checkbox is selected in page item

Hello All,

I have a checkbox group as below which returns numeric value as 0,1,2,3,4,5

select distinct studyid,clinical_er from cancer_kk.pwp_demog

where instr(':'||:ER||':',':'||CLINICAL_ER||':') >0

My checkbox group name is ER.

My query for IR is

select distinct studyid,clinical_er from cancer_kk.pwp_demog

where instr(':'||:ER||':',':'||CLINICAL_ER||':') >0

The above query works fine when something is selected in checkbox. But when none of them is selected I want to display all values instead of none. I tried nvl(:ER,clinical_ER) but it wont work for in operator. When more than 1 selected it returns invalid number error.

Can anyone please help me on this. When none of them selected i want to diaplay all records and something is selected and it should obey as per the selection.

Thanks!

This post has been answered by jariola on Apr 3 2024
Jump to Answer
Comments
Post Details
Added on Apr 3 2024
5 comments
273 views