This discussion is archived
5 Replies Latest reply: Nov 14, 2012 8:55 AM by 714270 RSS

Why does the "return value" sometimes display in a LOV?

Kim2012 Newbie
Currently Being Moderated
Usually, the "display value" displays in Select List LOVs (that's good). But occasionally, I see the "return value" in them. Why is that? Is there a certain parameter setting that needs to be tweaked?

P.S. It doesn't seem to matter whether I choose Select List or Popup. Also, I'm using Apex 4.1.

Thanks,
Kim
  • 1. Re: Why does the "return value" sometimes display in a LOV?
    matthew_morris Expert
    Currently Being Moderated
    Usually, the "display value" displays in Select List LOVs (that's good). But occasionally, I see the "return value" in them. Why is that?
    When you have an LOV item that contains a value that does not exist in the supplied LOV data, and the 'Display Extra Values' property for that item is set to 'Yes', then those values will show in the page item. For example, if you have an LOV with the following options:
    DISP_VAL     RET_VAL
    One          1
    Two          2
    Three        3
    Four         4
    ...and the item (presumably pulled from existing data) had a value of '5', then '5' would appear in the page item because nothing in the LOV tells Apex what else it should display.
  • 2. Re: Why does the "return value" sometimes display in a LOV?
    Kim2012 Newbie
    Currently Being Moderated
    Hey thanks for replying, Matthew. I don't think that's the problem though. The return value that is sometimes displayed is the correct return value that corresponds to the row previously selected via the LOV. To use your example data. I selected Four with the LOV, but then sometimes see "4" being displayed instead of "Four". Why is that?
  • 3. Re: Why does the "return value" sometimes display in a LOV?
    714270 Pro
    Currently Being Moderated
    Kim2012 wrote:
    The return value that is sometimes displayed is the correct return value that corresponds to the row previously selected via the LOV. To use your example data. I selected Four with the LOV, but then sometimes see "4" being displayed instead of "Four". Why is that?
    Hi,

    In case you are using pop-up LOV, the "Input Field" setting controls this. It basically has 2 options - "Not Enterable, Show Display value and Store Return value" and "Enterable, Show and Store return value". In your example, if you use the second option (Enterable, Show and Store return value), you will get "4" when selecting "Four".
  • 4. Re: Why does the "return value" sometimes display in a LOV?
    Kim2012 Newbie
    Currently Being Moderated
    Where are those options? I'm working on an enterable Report Column and I don't see an input option such as that. Thanks.
  • 5. Re: Why does the "return value" sometimes display in a LOV?
    714270 Pro
    Currently Being Moderated
    Are you using APEX_ITEM.POPUPKEY_FROM_QUERY (or Popup Key Query based LOV in the column attribute) or APEX_ITEM.POPUP_FROM_QUERY (or Pop-up LOV query based LOV in the column attributes) function? When using APEX_ITEM.POPUPKEY_FROM_QUERY, the control should return "Four" (as per your example). When using APEX_ITEM.POPUP_FROM_QUERY, the control would return "4".
    You can just implement these in your report column and see the difference.


    Thanks,

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points