Announcement

Collapse
No announcement yet.

Can I add a NULL option when building a lookup for a select field

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can I add a NULL option when building a lookup for a select field

    Hi.
    I have an integer field, which I set as select. I put in the following which works fine:
    SELECT ID, Label
    FROM sccms_core_pages
    ORDER BY Label

    This gives the user a selection of:
    -------------------------------
    dog
    cat
    bird
    -------------------------------
    However, I don't always want to actually pick what is given - sometimes I want to just pick NULL. I am not sure if there is a SELECT that would add NULL as an option, so the user would see:
    -------------------------------

    dog
    cat
    bird
    -------------------------------

    The first line in the select being a blank line - causing a NULL value to be put into the field. The field allows NULLS in the DB.

    This has to be a dynamically generated select, not manual.

    Thanks for any suggestions.
    Jamie

  • #2
    Hi Jamie, use the "Title" and "Title internal value" at lookup options ...
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Wow - that did it! I put NULL in the Title and NULL in the Title Internal Value. So Now I can select and put a NULL value into the field.

      IMHO the terminology used for these settings is not intuitive, but it was obviously built to do exactly what I was trying for.

      Thanks Reinhard!
      Peace,
      Jamie

      Comment


      • #4
        Originally posted by onmountain View Post
        IMHO the terminology used for these settings is not intuitive [...]
        Yes, but's an language problem ... "Option for the first line / entry" or so would be better.
        Best regards: - Reinhard -

        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

        Comment


        • #5
          That makes sense.

          Comment


          • #6
            Probably I didn't understand the question but if you flag "Show title" that's the functioning.

            Comment

            Working...
            X