4 Replies Latest reply on Jan 13, 2019 10:52 PM by PaulP

    How to display a mask for null in an IG Select List?

    PaulP

      APEX 18.2

      I have an editable IG with a Select List on one of the columns.  Here is the Select List attributes

      Help states

      A mask DOES appear for a normal text item (as specified in the Attribute property of the IG)

      but NOT for a Select List when I render the IG.

       

      How do I display something other than a blank value for a null value in a column with a Select List in an IG... other than using an NVL() function in the SQL?

      thanks in advance

      PaulP

        • 1. Re: How to display a mask for null in an IG Select List?
          Jorgelina

          Hi,

           

          Is this for the Plea Type column??

          It actually should work, can you try to make sure there is null in any of the records to see how it is displayed, because the image you took is showing "Guilty" for each one of them.

          Regards!

          • 2. Re: How to display a mask for null in an IG Select List?
            PaulP

            No it’s the highlighted column headings that have Select lists on them.As you can see the null values are blank even with the attributes set to show a mask for nulls

            PaulP

            • 3. Re: How to display a mask for null in an IG Select List?
              Jorgelina

              Hi,

               

              Sorry, my mistake... I missed the "GRID" part... that is why I was not sure why was not working.

              Never done this on GRID, so I checked it out and investigated it... and yes, it is not, and I believe it should replace...

              I also tried to add nvl(field, -1)  and set the return value to -1 for the legend, and does not work.

              It will only work, when value for returning is not null, and it is inside the select list options...

              For example, in the query setting the nvl(field, -1)  and then, in the select list values, including in th evalues  "select   'choose something' as d, -1 as r  from dual" (or whatever other way you would need to set it up); or just setting the filed

              Problem is, that being a grid, you want to use the SAVE button, and want it to be saved as is. But that would imply that instead of a NULL you would get a  -1 in the field.

               

              So, basically, to your question, it is not possible (but maybe it should).

               

              Either way, I think that if you MUST have this default message, you will need to save the GRID using a PL/SQL rather than letting the GRID do it automatically, this way you can control those fields and if they are still having a "-1"  set them to still be null in your database table, and for that I suggest you refer to:  APEX 5.1 How to manually process Interactive Grid data using PL/SQL

               

              I hope this somewhat helped you.

              Regards.

              1 person found this helpful
              • 4. Re: How to display a mask for null in an IG Select List?
                PaulP

                Thanks for you help and tests Jorgelina