Popup lov to return the display value instead of the value of "return"?

I have the popup following LOV (retrieves the first set of lines and filters)


SELECT empname d, EMPLID R
X
WHERE OPERATING_UNIT =: P1_OU
AND DEPTID =: P1_DEPTID
Union
SELECT "there is no list" d, r null
OF THE DOUBLE
WHERE THERE IS NO
(SELECT 1
X
WHERE OPERATING_UNIT =: P1_OU
AND DEPTID =: P1_DEPTID);

I want the popup to show "there is no list" If the sql returns no rows, indicating to the user to change their selections for P1_OU and P1_DEPTID. However, when I try to test it in the Apex, if the user selects this message, null is not returned to the form, instead, the text of the message is returned. Is there anyway I can make it work properly? I appreciate the help. Thank you.

Suni

Published by: suni1 on February 19, 2010 12:43

You can put in a position to submit the calculation for your LOV as element that is your LOV = "there is no list" then put it to NULL w/PL/SQL

CASE WHEN :My-Item != 'no list exists' THEN :My-Item ELSE NULL END

-Bob

Published by: Bob37 on February 19, 2010 16:06

Tags: Database

Similar Questions

  • Can we make Popup LOV (views, return) key point as EDITABLE field

    Hello

    Can I do Popup LOV key (description of the poster, returns the key value) point as editable... by default, we cannot get anything... Select in the list... it does allow the user to enter the text in the field.

    Thank you
    Deepak

    Hello

    It does not work because it is not supposed to work this way = not)
    You must write the code to make it work.

    How it should work if your display value is not unique?
    How do you determine the value of the key that is inserted to the table if you write just something in the text field?

    This should make any editable element

    $x('Px_YOUR_ITEM').disabled = false;
    

    Of course, there may be exceptions

    BR, Jari

    Published by: jarola on November 22, 2009 20:41

  • From popup LOV filling of the other LOV

    How to dynamically fill the LOV based on the value selected previously.

    ex:

    P1_ITEM:

    Type: POPUP LOV

    List of values definition: select deptno, deptno retired from the Department.

    P2_ITEM:

    Type: POPUP LOV

    List of values definition: select empno, empno ret from emp where deptno =: NVL(:P1_ITEM,deptno)

    Version: 4.2.2

    Hi PT,.

    Make sure first that your second item LOVs query contains your P1_ITEM somewhere in the where clause is dependend.
    Then add an onchange dynamic action when P1_ITEM changes your first action is to PL/SQL:

    Code: NULL;

    Items to submit P1_ITEM

    Then add another action that refreshes your 2nd article.

    Kind regards

    Joni

  • Return the value of the DB display in a Popup Lov (selected)

    Hello

    I use a Popup Lov to select a value and check in the DB (it works), but I do not know how to return this value as selected in the popup Lov and keep the other options available to select again.

    Any ideas?

    Thank you in advance,
    Alan Martini

    Hi Alan,

    OK - keep in mind that this will affect each using the popup LOV page

    Text on the page popup LOV template, under the body of Page attributes, I removed the onload = "first_field ()" let fair: style = "margin: 0;" "

    Then, as part of Page footer text below that, I added:

    <script type="text/javascript">
    var aa = document.getElementsByTagName("A");
    if (aa)
    {
     aa[0].focus();
    }
    </script>
    

    It's just a collection of tags 'A', and if there is at least one, it shifts the focus to the first. My previous SQL makes the value currently selected one in the list, so this should be the same as that. As the item has focus, the user has just need to press ENTER to select this option.

    Andy

  • Possibility to get a popup to display the display value "" and not the "return value".

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    Concerning

    Ben

    Benton says:

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    See limiting the number of values in a LOV

    If it comes to a page element, and then change the type of Popup LOV key.

    If there is a control in a table, it's another reason to upgrade to a supported version, or the tabular form will need to be converted to be manually generated and processed in order to allow the appropriate control be returned using the apex_item.popupkey_from_lov method

  • Cannot change PopUp LOV width and height in version 4.2.5.00.08. I change the values of 450 400 in the Popup list template values (Section of the window), but my function genList0_f07_$ _row (), retains the same settings. Is this a bug?

    Hello

    I use APEX 4.2.5.00.08 to my app.

    I have a region of reports, where I display a column set. A column is the column attribute "display as" the value 'Popup LOV (LOV based query).

    I press the button to retrieve the LOV, I get a popup of 450 x 400 pixels.

    I go to the side of the model and navigate to "Popup list of values of model", where I can see in the section 'Window' attributes 'Width' and 'Height' value 450 and 400. I edit them and save them and there is nothing going on. I'm sure that the template belongs to my selected theme.

    I saw in the HTML source code that is the called function:

    <!--


    function genList0_f07_$ _row)
    {
    w = open ("wwv_flow_utilities.gen_popup_list" +)
    « ? p_filter ="+
    "& p_name = ' + escape ('f07') +.
    ' & p_element_index = ' + escape ('0') +.
    ' & p_elem_id = ' + escape ('f07_0000').
    ' & p_form_index = ' + escape ('0') +.
    ' & p_max_elements = ' + escape ("") +.
    ' & p_escape_html = ' + escape ("") +.
    ' & p_ok_to_query = ' + escape ('YES').
    ' & p_flow_id = ' + escape ('114') +.
    ' & p_page_id = ' + escape ('100201') +.
    ' & p_session_id = ' + escape ('16021544706004').
    ' & p_eval_value = ' + escape ("") +.
    ' & p_translation = ' + escape ('NO') +.
    ' & p_lov = ' +.
    ' & p_lov_checksum = ' +.
    ' & p_item_id = ' + escape('-683997768') +.
    ' & p_column_id = ' + escape ('25022622060292812'),
    "winLov,"
    "Scrollbars = 1, resizable = 1, width =400, height =450"); "
    If (w.opener is nothing)
    w.opener = auto;
    w.Focus ();
    }
    ->

    I see that the values has not changed. I also connected and disconnected. I am inclined to believe that it is a bug of the APEX.

    The only solution I think is to replace this function, which is NOT ideal.

    Thank you

    Digital

    The parameters are generated only, nothing you can do about it because it does not use the model for these properties of the couple. Other things work fine for example the names of button or title window etc. I guess that, Yes, it is a bug. It's still there in the apex 5 too, I checked. The default values of the template do not match, the value in the generated code is always 400/450. So I guess it's pretty much a wait on 5.1.

    Here's a fun hack to make it work well on your page (works in apex 5 too, because the code is always the same). Put this in the execute on loading of the page section:

    (function(){
      var _open = window.open;
      window.open = function(){
        if ( arguments[1] === "winLov" ) {
          arguments[2] = "Scrollbars=1,resizable=1,width=500,height=700";
        };
        return _open.apply(window, arguments);
      };
    })();
    

    Change the settings to your liking. This will replace the existing window.open call, which is what the popup lov use and replace it with our own code. It does not interfere with other things. As the name of the new window is always "winLov" for the popup lov, it is the argument that is checked.

    During the call to window.open to open a new window with the name "winLov", parameters are replaced with your own version of it. The window is called as usual, using the stored reference.

    Edit:

    Yes, do not use the trick of resizing. My hack can be a bit tedious, but it's much less invasive for the end user (see open, bam, resize. "Even gets funky on multiple monitors). Also, this thing in the popup lov template will affect each lov popup that you use in the application, which is much less interesting than my specific page code.

    Edit2:

    I did a little digging in the source code, and I don't know why it does not work. Popup lovs are actually equipped to deal with it. My guess is that the parameters are recovered only after that the lists were generated, causing the package variables global to use their default values instead of model parameters.

  • Popup LOVs... where's the search value?

    Someone had a bit of luck to dig into the background of the popup LOVs?  Here's a question I'll try to find the answer to.  I have half of the answer, but not all.

    We have an external system that provides real-time data via webservices.  Our goal (and we did that day no problem) is to consume the XML response from webservice with PL/SQL and then turn us these data into pipeline of what looks/walks/talks like a table or view using functions.  The point here is to make these data available to Apex for various things, including the popup LOVs built on the pipeline functions.

    The challenge is that some Web services provide a large amount of data (for example, a list of parties, who at this moment in our dev environment is only about 16 K records, but as we move forward, we know that these data grow to be a good lines 118K or more).  Already at just 16K records, it takes a good 30 seconds for questioning.

    Popup LOVs of apex seem to be based on the model that they perform an implicit request by all reviews and then apply the filter on the value of research (if there is a value entered).  It is very good for LOVs against standard tables and views, but on larger volumes of data to a function in the pipeline against a data source that is out of our control... not very good.

    We made a functional decision on some LOVs (such as a list of 118 K coins) that any user in their right mind really never would come into such LOV and simply browse through the records.  They would already have an idea of a reference number or description of the part they would search by.  Our strategy was so to the LOV follow these steps:

    1 return at any line if the user did enter no search criteria.

    2 manipulate the LOV dynamically if the user did enter search criteria such as the result is * pre set * filtered first through the webservice (it accepts input parameters).  This greatly improves performance and so far we have work * for Apex regular page elements * but not for tabular forms (which is where my question arises.

    Here is an example of such a definition LOV:

    RETURN ext_parts_util.get_parts_lov_sql (p_search_val = > apex_application.g_x02);

    By trial and error, we have found that when the user is in the popup LOV and enters data in the search field and click the "Search for", the value they use to search land behind the scenes on the server in apex_application.g_x02.

    Thus, within this service, we return a SQL string that looks like one of two things:

    1. If apex_application.g_x02 is null, we return to this (a dummy SQL statement that returns no rows):

    Select "," Ruy where double 1 = 2.

    2. else (there is a search value), we call our webservice in pipeline function and pass it apex_application.g_x02:

    Select part_number d, part_number table r (my_package.my_function (p_part = > '%' | apex_application.g_x02 |)) '%'))

    The pipeline works calls the Web service and passes the value of searching with wildcard characters of apex_application.g_x02 and the Web service itself filters the data down, ahead.  This improves performance greatly for us.

    Now, here's the problem and the real question... above fantastic work for Apex points page.  But for a popup LOV in tabular form, it's a no-go.  In a tabular presentation, the popup LOV apparently differs significantly.  The search does not value land in apex_application.g_x02 in this case, and we not were able to know where it ends.  Popup LOVs in tabular forms also lack other declarative features (Don't they always with tabular forms, which appear to be three releases behind the common page elements?)  GRRRR...) popup LOVs such as what makes them not get the first set of rows, etc then we can even use it to help discourage a wide open query.

    Has anyone found where the search for value in a popup LOV in a sub form of table for the back-end that happens? Bottom line, this is what we are looking for so we can define these SQL LOV to refer to everything that is instead of apex_application.g_x02.

    He got after all.  I got to work with a DBA who could clear the SQL area and then watch as I performed a search in the LOV.  Example:

    SQLT AND EXECUTIONS

    ---------- ---------- --------------------------------------------------

    Select 1 37.371843 / * generated * / D, R) (select

    PART_NUMBER | ' -- ' || part_description d,

    PART_NUMBER fofes_ext_parts_v r)

    wwvlovinlineviewname where upper (D) as

    '%'|| Upper(:WWV_LOV_RETURN_KEY_UTIL_1111) | » %'

    It seems that the value in the search LOV popup on a tabular presentation of the land into a link called "WWV_LOV_RETURN_KEY_UTIL_1111" variable

  • Submit after selecting the value of Popup LOV

    Anyone know if it is possible to make the Popup LOV behave as the list select and resubmit the page after selecting a value?

    The Select list has an additional attribute in properties named "Page Action times changed value". One of the options for this attribute is "submit Page". This attribute is not available for Popup LOV, but I would like to be able to create the same behavior. The number of values that might be returned for this article is too many to use a Select list...

    I think I might be able to add a bit of Javascript somewhere and do a "onChange.submit ()" or something like that, but I'm not sure of the syntax, or where to put it.

    Any help gratefully received...

    TIA,
    Eric

    Hello Eric,

    Create a "dynamic Action" that fires when the value of Popup LOV is changed and set the Action to "submit Page".

    Thank you
    Machaan

  • Problem LOV... Turning the display value and no key-value

    Hello. Sorry for my bad English.

    I have a problem with LOV dynamic pop up.

    I have a simple form called nom_element and item_code containing the form A. users can create, update, and delete a new item using this form.
    Another form called form B has a field called item_code item_code is a dynamic field of LOV pop up and a request for this LOV is like that;

    Select nom_element d, r from item_master by item_code item_code;

    When I create the new record in the form B and LOV allows to find and get the item code, LOV works very well
    and he returns the key value in the field of item_code.
    But when I try to update the record (I have a link to the page of the form B), item_code field value is not the key-value of LOV, but is a
    Display value of LOV.

    Any ideas?

    Thank you.

    Hello:

    If you want to display the key value, and then create a new field that can be a test field or a tabled text (display only) and assign the value of the column of the reporrt link or just the column as it appeas in the database.

    If you use the form at the same time create and view, you might want to do this new field, but also your LOV field as conditional.

    Bruce

  • Popup LOV - add values in the textfield

    Hello

    I have a little problem with my popup lov.
    whenever you select a value from the pop-up window, the previous value of the textfield object is replaced with the new.
    But what I want is to add values separated by a comma (for several emailadresses, like "[email protected], [email protected],...") »).
    necessarily to do this (or desired), by clicking on the icon for the second time, the search field should not contain the value actually (if it is done, the lov is filtered by this value).

    any suggestions? :(

    A standard popup LOV will not give you this functionality. You must create your own custom context menu LOV. If you can, you must use a LOV shuttle instead of popup. This one is more manageable. See this example if it helps:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:166

    I use for the selection of two of my customers email addresses and they are happy with it.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Digital Format on column displayed as a Popup LOV mask

    APEX 4.2 using theme 24.  In a tabular presentation, I have a column that is defined in the table as number 4 and I display as a Popup LOV.  I want to display on the initial load data form left padded with zeros - 0000 format mask. The Popup LOV gray on the ability to set the format mask. If I change it to a text field I can define the mask and display it as I want. I need to allow users to choose one of the LOV based on another table where the column is defined as a character. When the value is selected in the LOV it appears with the full left 4 digits padded with leading zeros, which is what I want.  However as I said on the initial load of data the leading zeros are not displayed.  It's really just a matter of Visual for the users, it is part of a GL account number and users are accustomed to seeing the full figures as if it was the character.  And please do not suggest I change the column in the table of characters too much process on the side server use it as a number.

    Thanks for the feasible suggestions!

    Therese

    Theresas wrote:

    APEX 4.2 using theme 24.  In a tabular presentation, I have a column that is defined in the table as number 4 and I display as a Popup LOV.  I want to display on the initial load data form left padded with zeros - 0000 format mask. The Popup LOV gray on the ability to set the format mask. If I change it to a text field I can define the mask and display it as I want. I need to allow users to choose one of the LOV based on another table where the column is defined as a character. When the value is selected in the LOV it appears with the full left 4 digits padded with leading zeros, which is what I want.  However as I said on the initial load of data the leading zeros are not displayed.  It's really just a matter of Visual for the users, it is part of a GL account number and users are accustomed to seeing the full figures as if it was the character.  And please do not suggest I change the column in the table of characters too much process on the side server use it as a number.

    Simply select it in the source region like query:

    ...
    to_char(col, 'fm0000') col_alias
    ...
    
  • Issues Popup LOV

    4.1.1 forms

    Oracle 10g

    Windows

    20 of Firefox

    I have a form region that has a Popup LOV. Since this region is used by different pages, that it is set up on the Page 0 and the item source type is static. The value is assigned through process. Because I don't want the user to enter data, I put the Settings entry field as entrable not, see the display value and store Return Value. If I select in the popup LOV, it shows the display value. But if it is assigned, or used a value by default, it is not displayed. For a new line, I want the default name of the employee current user (based on the number of employee registered in a part of the application); I tried a dynamic action and a process, and none of them worked. If it is an existing line, I does not display the name of the employee according to the number of employees registered in the database (which assigned its thanks to a process) correctly. Why the value is not currently running for a new line?

    Can someone please?

    Robert

    http://apexjscss.blogspot.com

    I fixed the problem (I think!). I have to do a few tests more. It is in the logic of the process. I had to put a block begin around the SELECT statement so that the flow after the exception will go to the next statement.

    Then... Never mind.

    Robert

    http://apexjscss.blogspot.com

  • Popup LOV result differs from Lily LOV

    Hello
    I wanted to spend a popup LOV lists using the same named LOV, but the display changes. I wanted the field to display a name, even if the underlying value is an id number and it works very well with a simple list of LOV. When I change the pop-up list, the name no longer displays in the field, only a number. Whey is the Popup behaves differently from the list? Am I missing something? I even did in Apex 4.0.1 and earlier at the Apex 4.1 and got the same result.

    Pat

    Try to use the ' Popup * key * LOV...» "vs type 'Popup LOV."... ».

  • Popup LOV key greyed out: javascript change to "disabled" to "readonly"?

    With a Popup LOV key field, the description displayed as dimmed due to having a disabled = "disabled" attribute of the input tag. Grayed text is difficult to read and a question of ease of use in my application.

    I have not found a way to change this in Application Express and now read an answer in this forum there is no way to change this. However its replacement by a readonly = "readonly" attribute would change it: the text would be black and readable normally, while remaining unmodifiable.

    Someone can give me advice on how best to incorporate a javascript in my Apex page to remove the disabled attribute and add the readonly attribute to the input text tag? Thank you!

    Hi Mark - Three options come to mind.

    (1) use a block style in the HTML page for the re-style control disabled to more the look you want
    (2) use JavaScript to accomplish the same thing as above. Note that 1 and 2 can be a bit tricky as not all browsers likes to you allows you to change the style of the disabled items. That is to say a habit to ignore your changes of colors on a disabled fields
    (3) use JavaScript to change the disabled read-only control. If you do not want to allow them to click in the field (readonly fields are clickable and selectable, editable), you must add some additional JavaScript such as onFocus = "this.blur (); »

    The basic gist 2 and 3 is to find the element using either getElementByID ('') or by using the "document.

    . "syntax and simply run the following example:"
    var popup_fld = getElementById ('p12_blahblah');
    popup_fld.style. .....

    or

    popup_fld. Disabled = false;
    popup_fld. ReadOnly = true;

    To find the name of the field to the right for the var line, you should look into the source of a page with the pop-up page and see what is ID generated by APEX for the context field. You must also tmake that your javascript is after the shape since it will error if she tries to run before the form field is drawn.

    Hope that's enough for you're going to get. I didn't have the time to set up a complete example. Recognize the readonly fields are also submitted with the form while the disabled fields are not, then you'll want to do that there are no surprises in the functionality of the form when you make this change.

    Rgds/Mark M.

  • Popup lov and submit

    All,

    Does anyone know how to get popup lov to work with submit all in one?
    Currently, I have to create the popup LOV first, once the user selects the element of choice, they then click on the button submit to get the value of the item recorded in the session. It's embarrassing. Can someone tell me how to do it in one step? Thanks for your sharing.



    Munshar

    In the 'attributes of HTML form elements' for the LOV POP - specify the page element

    OnChange = doSubmit ();

    CITY

Maybe you are looking for