Way to choose 'null' values in a badge list in Oracle APEX

Viewed 246


I currently have badge list as a filter for a table. When you click on the value, this url is run:
'f?p='||:APP_ID||':5:'||:APP_SESSION||'::::P5_VALUE::' url

And this is how I'm calling the table:

select ROWID...
  from Table
  WHERE (:P5_Value is null OR Value = :P5_Value) 

I have the "P5_Value is null" b/c I want to have the option when a user clicks the reset button to be able to see all the values again (reset the filters).

So the problem I'm having is that when I click on the 'unassigned' filter, the tables don't get filtered properly since the 'unassigned' value are all null right now. So I'm guessing that it's getting confused with the 'reset' function? So I was wondering if anyone knew how to solve this issue?

For reference, this is how I'm creating the filter, once the badge is clicked:
'f?p='||:APP_ID||':5:'||:APP_SESSION||'::::P5_VALUE::' url


1 Answers

Based on your comments below your question, I think maybe you need this?

select ROWID...
  from Table
  WHERE (:P5_Value is null 
        OR :P5_Value = 'U' and Value is null
        OR Value = :P5_Value
        ) 

Then modify the LOV for P5_Value so that it includes value 'U' for 'Unassigned'.

Related