LOV - get the value for the hidden id

Hi, I thought that this would have been asked some time earlier, but I can't find it. So I hope that some of you know.

Once I've done Oracle Forms applications, and now I wanted to do something that I thought was simple in apex. However, I do not understand how.

I have a form, in this form, I have a field with a value of research. When I do an insert or an update, I can query other tables of search I can't find the value using a LOV, and when I choose that it, it shows on my screen so beautiful! But what I really want, is for sure the id value refers to the base table of my form. An id is not something I want on my screen, I use the ID as a technical data absolutely empty of meaning, so my identification fields are hidden to the human eye.

I can of course, when I secured the record query, who look to the top of table, once again, but that sounds like extremely bad programming. There should be a way to display the name in the LOV, the name in the visible name in the form field and give the field invisible id the value of the ID.

What is the technique for this in Apex?

Any help is greatly appreciated.

Hello

Apex, you can use select list/multi select or the shuttle, which displays the value that you want to display to the user, but when you save, it will save the id associated with the display value.

Kind regards
Shijesh

Tags: Database

Similar Questions

  • parameter $ v see - how can I get these values for both instances on the db?

    I have a procedure which empty the content of all the parameters from the parameter system view v$ for the audit of needs, so that we know if a parameter has changed from month to month, but we have 2 instances running. How to make sure and save the settings for the two instances? So far the procedure saves the settings for the instance happened to run on (this is random).

    However, when I use the TOAD, I can access parameters for the two instances in the database/administer/Oracle settings.

    Thank you!

    Instead of V$ PARAMETER use GV$ PARAMETER so that you can get the id of the instance

    SQL> describe gv$parameter
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     INST_ID                                            NUMBER
     NUM                                                NUMBER
     NAME                                               VARCHAR2(80)
     TYPE                                               NUMBER
     VALUE                                              VARCHAR2(4000)
     DISPLAY_VALUE                                      VARCHAR2(4000)
     ISDEFAULT                                          VARCHAR2(9)
     ISSES_MODIFIABLE                                   VARCHAR2(5)
     ISSYS_MODIFIABLE                                   VARCHAR2(9)
     ISINSTANCE_MODIFIABLE                              VARCHAR2(5)
     ISMODIFIED                                         VARCHAR2(10)
     ISADJUSTED                                         VARCHAR2(5)
     ISDEPRECATED                                       VARCHAR2(5)
     ISBASIC                                            VARCHAR2(5)
     DESCRIPTION                                        VARCHAR2(255)
     UPDATE_COMMENT                                     VARCHAR2(255)
     HASH                                               NUMBER
    
    SQL>
    
  • Get price value for last date items

    Hello

    I have a table with

    item_id, price, cr_date

    How can I get the latest price for each item_id

    ex.

    1, 2.1, January 1, 2015

    1, 2,4, 4 January 2015

    1, 1.7, January 2, 2015

    3, 4.5 7 January 2015

    3, 2.2 January 2, 2015

    I want to get

    item_id price, Date

    1, 2,4, 4 January 2015

    3, 4.5, 7 January 2015

    Concerning

    ARIS

    Hello

    You can use the aggregate LAST, as this function:

    SELECT Item_id

    MAX (price) DUNGEON (DENSE_RANK LAST ORDER BY cr_date) AS last_price

    MAX (cr_date) AS last_cr_date

    FROM table_x

    GROUP BY item_id

    ;

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

    The combination (item_id, cr_date) is unique?  Otherwise, the query above returns the highest price on the last date; This is what MAX (price) means.

  • cannot get the hidden script to work

    Well I searched and searched even more and I'm starting to wonder if my program of liveCycle is perhaps faulty for some reason any. I looked over the script for liveCycle guide and see that the script in order to hide an object goes like this

    myTextField.Presence = 'hidden ';

    I am trying to use the script in a radio button (Yes and no) to hide the text box if none is selected in the subform that contains the question. but for some reason, I can't script hidden to work. I want the legend to become hidden as well. But when I use 'invisible' instead of 'hidden' text entry box is not selectable for the user to input when you test the form in acrobat. I go about it the wrong way? Or just 'hidden' command does not work in my copy of liveCycle. Thanks for any help

    Hello

    I'm guessing that this is not your version of LC designer - there are a few settings, you will have to do. Here is a sample.

    Have a look at the script in the click event of the radio button group.

    Also have a look at the file / form properties / Defaults: you should have to register script changes set to automatic:

    Finally, to make objects appear and disappear is a dynamic function and means that you will have to save your forms in a dynamic form of XML:

    Hope that helps,

    Niall

  • Get the value of the question page before submitting.

    Hello all, I use the Application Express 4.2.5.00.08. I have a question on getting a value for a page element before the page is sent. I have a dynamic action:

    Action: Moving the mouse (on a region/State)

    Real Action: $('a[href*="39"]').each (function (index) {}
    lnk = $(this) .attr ('href');
    $(this) .parent)
    . Parent ('tr')
    .Attr ("href data ', lnk")
    {.mouseover (function ()}
    $(this) .css ("cursor", "pointer");
    Lrowrequired var = $(this) .closest ("tr"),.
    BLOCK = lRow.find("td[headers=BLOCK]").text ();
    $x('P39_BLOCK').value = BLOCK;
    })
    {.mouseleave (function ()}
    $(this) .css ('cursor', 'default');
    })
    });

    I am successfully able to get the value of the line while I'm hovering above the report (and P39_BLOCK is refreshing). But, in this case, the value is not set whenever it changes. My question is, if I need to use this value (say, put an another page element when P39_BLOCK is changed) without submitting the page, how is that possible?

    Kind regards
    MFadel.

    Hi Mohamed,

    That's what bothers! In my first dynamic action, I have real action 'Execute JavaScript Code', which doesn't have a property "Page items to show.". And I need this code to retrieve values from the row of the report.

    On the right, you will have the option 'page elements to present' the dynamic JavaScript actions. Only the PL/SQL. And you do not need to handle things strictly the use of javascript. JavaScript is usually used to manipulate items on the page itself, not the things on the server/session). If you need to present before your PL/SQL block, you can either use AJAX call, or you can create a dynamic action of PL/SQL that runs before your JavaScript. Put this field in the 'submit' page elements and the block of code, just put null;

    Here's a sample in javascript, ajax call. It pushes three elements of the page in the session or in the scope where APEX can access their values. You can return values through AJAX if necessary also:

    $.ajax ({type: 'POST',})

    URL: "wwv_flow.show",

    data: {}

    p_flow_id: $('#pFlowId').val (),.

    p_flow_step_id: page,.

    p_instance: $('#pInstance').val (),.

    "x 01': P39_PAGE_ITEM_1, '.

    "x 02': P39_PAGE_ITEM_2, '.

    "x 03': P39_PAGE_ITEM_3, '.

    p_request: 'APPLICATION_PROCESS = YOUR_PROCESS_NAME'

    },

    success: function (data) {}

    Console.log (Data);

    }

    });

    Then you would have a PL/SQL process called YOUR_PROCESS_NAME that can refer to variables such as

    my_var_1 VARCHAR2 (100 CHAR): = APEX_APPLICATION. G_X01; -Javascript password

    my_var_2 VARCHAR2 (100 CHAR): = APEX_APPLICATION. G_X02; -Javascript password

    my_var_3 VARCHAR2 (4000 TANK): = APEX_APPLICATION. G_X03; -Javascript password

    Can I use in my "PL/SQL procedure? Because in the end, I'm trying to use this value in a PL/SQL procedure:

    To answer your last question, Yes, you can use the P39_BLOCK in your PL/SQL, how you demonstrated above, but you must submit in the 'page' referred to submit box, otherwise it uses the last value that has been submitted.

    What I'm not clear, is do you need really value before executing the PL/SQL or you just want your PL/SQL? If you just try to pass it in PL/SQL and then just use the dynamic action of PL/SQL and pass it by using the "elements of the page to present. '' Remember, if you need a new value to publish on the page, you will need to put these fields in the box "items to display the page.

    If you only need the value of front page because you will use in javascript, somewhere, then reference it with jQuery or js and then use AJAX to continue your treatment.

    A third way, you could do, is to create a dynamic action of PL/SQL that runs before the javascript code that is null; in the body of PL/SQL, but put the P39_BLOCK in the "elements of page to submit" box. Who will just send the page element, and then take action dynamic javascript. But, I don't know why you would do that since you can't have the value submitted for javascript to use.

    Hope that all makes sense.

    Jen

  • How to add the default value for the "Full - Text Search" box

    Hi all

    I am looking for the ability to add a default value for the "Full text search" box in the search form.

    Example:

    When the user accesses the search page it get default values for some fields (defined in the rule as default values) such as

    xField1 = txt1 and xFiel2 = txt2.

    and Furthermore we need full-text = Hello world.

    Is this possible?

    Another way that we use is to open the search by URL with coreContentOnly = 1 as a form:

    http:// < Server >/cs/idcplg? IdcService = GET_DOC_PAGE & to Action = GetTemplatePage & to Page = STANDARD_QUERY_PAGE & coreContentOnly = 1 & to xField1 = txt1 & to xFiel2 = txt2

    It is possible to add full-text criteria here? Somethig like: & text = Hello World

    Thank you

    Leon

    It is not possible in a very obvious way, not to mention that it is a rather strange request.  I can't really imagine a realistic use for this case.

    Anyway, without a messy customization, you should provide a default query with an FTX inside element text setting (i.e. "IdcService = GET_DOC_PAGE & Action = GetTemplatePage & Page = STANDARD_QUERY_PAGE & QueryText =Hello World" "")

    To do this in a profile in the secondary effects of the profile section, add the following:

    <$dpPromote("QueryText",>Hello everyone") $>.

  • How to get local values using the API of Java OLAP?

    http://download.Oracle.com/docs/CD/E14072_01/OLAP.112/e10794/overview-summary.html#Vals

    The third part of a unique value is the local value. In the previous example, the local value is CY2001, which is the identifier for the year 2001 in the overall scheme. Java Oracle OLAP API has the classes and methods that you can use to get the local values of dimension members. See the descriptions of the classes MdmPrimaryDimension and MdmDimensionMemberInfo for more information on the unique values and the.

    How to get local values for a dimension or hierarchy or a level using Java OLAP API?

    I can not find how...

    For example, I would like to get the list of members for each level (in my application: countries, States, cities)

    Thanks in advance,
    JP

    The following code assumes that you have an object MdmPrimaryDimension, dimension and a sense of routine, dumpCursor(), that takes an oracle.olapi.data.Source object.

    Find the objects of metadata
    Hierarchy of MdmLevelHierarchy = dimension.getDefaultHierarchy ((MdmLevelHierarchy));
    MdmAttribute localValue = dimension.getLocalValueAttribute ();
    The list of levels of = hierarchy.getLevels ();

    Print the members of each level
    for (MdmHierarchyLevel level: levels)
    {
    System.out.println ("Level" + level.getName ());
    System.out.println ();
    Source querySource = localValue.getSource () .joinHidden (level.getSource ());
    dumpCursor (querySource);
    }

    In general, it is more common to want to print descriptions of members. For this, you can replace

    MdmAttribute localValue = dimension.getLocalValueAttribute ();

    with

    MdmAttribute valueDesc = dimension.getValueDescriptionAttribute ();

    How would you say

    Source querySource = valueDesc.getSource () .joinHidden (level.getSource ());

    For the "description" and "local value".

    Source querySource = localValue.getSource () .join (valueDesc.getSource ()) .joinHidden (level.getSource ());

  • Cannot get or point value for the LOV after::AddRow()

    I spent hours on this...

    I just want to add a new line in a tabular presentation and set a default value to a column with column attributes, display as value ' Select list (named LOV).

    Simply, I don't find a way to make it work.

    I have a default value that is stored in a hidden page element, P6_ORGANIZATION_PHONE_TYPE. Add online functionality is as follows:
    var currOrganization = $v('P6_SELECT_ORGANIZATION');
    var currPhoneType = $v('P6_ORGANIZATION_PHONE_TYPE');
    
    addRow();
    
    hideDefaultedColumns();
    
    $('input[name="f02"]:last').val(currOrganization);
    $('input[name="f05"]:last').val(currPhoneType);
    F05 indicates the type of phone that I'm trying to define. If I do any changes other than to change the view type to TextField, this code works fine. However, when it is 'List (named LOV) selection' I can not put the value or find a way to simply get a handle to the object. It's $('input[name="f05"]:last') gives "undefined".


    Help, please! This should be the easiest thing in the world.

    -Joe

    Sorry to be a bit slow to get back to you on that. What I think you need to do is:

    addRow();
    $s($('select[name="f05"]:last')[0].id, $v('P6_ORGANIZATION_PHONE_TYPE'));
    

    User.user $('select[name="f05"]:last') [0] Gets the id of the last select element in the table. The $s function Apex can define elements any kind will set the value of the option contained in P6_ORGANIZATION_PHONE_TYPE.

    Rod West

  • How can I display the display value for an element of lov in another area

    My page has a few elements that allow the user to select specific criteria for their report.
    pn_person - select point based on lov. Lov shows the name of the person and returns the code of the person in pn_person

    When the user has made their choice, they press a button that the report is generated.

    I want to do is show the display value for one of the search fields in the title of the report (for example, person_name) region. I think to do that I need to create a (hidden) pn_person_name point, then I put & pn_person_name. as a region

    However, how can I get the value of pn_person in pn_person_name display?

    I thought that apex_item.text_from_lov, but don't know how to use it - what elements (types), the calculations / process I need to create...

    THX Caron

    Published by: user11267129 on January 7, 2010 15:01

    Published by: user11267129 on January 7, 2010 15:02

    Published by: user11267129 on January 7, 2010 15:02

    Caron:

    You can use javascript to set the value of 'pn_person_name' to display the LOV selection value.
    Set the form field HTML to the elements attributes for the element of selection as list page

    onchange=$s('PN_PERSON_NAME',this.options[this.selectedIndex].text)
    

    CITY

    Published by: city has on January 7, 2010 17:22

  • Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value?

    Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value? I need the actual default value for an individual preference.
    Topic: config shows some default values, but I need the source from which everything: config returns to the default value.
    Any help in this direction is greatly appreciated.

    User Agent

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x 64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    The preferences that are not hidden if they have by default are stored in two JavaScript text files in the Firefox program folder
    You can open them in a tab in Firefox through these links:
    resource:///defaults/pref/firefox.js
    resource:///greprefs/all.js

    (702598/forum/1/702598)

  • How to get the lov value(true/false) that is running by pressing the F3 function key

    Hello

    I mapped key F3 function for list of values (lov), pressing F3 on the element of text (with associated lov) poster lov, but here the lov is implicitly run, so I am unable to get the value of lov(true/false), how to get the true or false value from the lov.

    I use Oracle forms 11 GR 2.

    What exactly do you mean by "the true or false value of the lov? Want to know if the user chose something from the lov. If so, you can create a KEY-LISTVAL-trigger on your textitem with something like

    IF SHOW_LOV('THE_NAME_OF_THE_LOV') THEN
      -- do something here
    END IF;
    
  • Problem of setting a value for the hidden item click on the button with processes action or pl/sql dynamic

    Apex 4.1

    Oracle 11g

    I have a page which consists of a main and several sub-regions area.  I have a pl/sql process in after the header SET_DISPLAY(:P400_DISPLAY:='MAIN';))

    Three subregions have a contional show where P400_DISPLAY = STORE.  It works in the hiding of the sub regions.

    Now, I want to change the value P400_DISPLAY to the STORE to show the subregions when I hit a button.

    I tried to create a dynamic action for the click on the Add button, but get the following error:

    The selected button uses a model of 'button' that does not contain the #BUTTON_ID substitution string #.

    I went to the models and found:

    Substitution strings

    Top

    Substitution strings are used in sub models to reference the value of the components. This report details use of string substitution for this model.
    Substitution string Referenced De Description
    #LINK #.YesModelTo be used in an attribute "href".
    #JAVASCRIPT #.NO.To be used in an "onclick" attribute
    #LABEL #.YesModelButton label
    #BUTTON_ATTRIBUTES #.NO.The attributes button
    #BUTTON_ID #.NO.ID generated button will be ID either the static button if defined, or if not will be a generated ID internally in the format 'B ' | [Internal ID of the button.

    I then tried to create a page process, pl/sql,: P400_DISPLAY: = 'STORE '; If the button is pressed.  The action of the button is submit page. However, it does not change the value of P400_DISPLAY and the subregions are hidden.

    Suggestions please on how to fix the template or change the value of P400_DISPLAY?

    The question of the root, it's that, even if you change the value of the element of your page, it is not visible to other areas of the page until it is in the session. Thus, any other action based on the value of the element of your page. the visibility of a control, a report based on the value of the item, etc. will be affected by changing the value of the item page until it has been changed in the session. Even after that, items are stored in the session, then you must do something to influence the revalued value. To see the effect of this, observe that your page will load and assesses the value of the element of your page, it sees which is the "MAIN" and mask areas. However, he didn't reassess after that.

    Then; your choices for this value set at the session are send the page, or use JavaScript to set the value in the session. If you use the latter, you will have to do extra work to make visibility tests be re - run, so, let's stick with the submit method.

    What you did above sounds correct to do this but, there are a lot of decisions, that you might have done that may have caused things to do not occur in the correct order.

    First of all, we will confirm that what I describe above is your problem. From the development environment, load the page, click on the button to change the value and submit. Now, click on the link marked the Session. He is always at HAND? If the answer is "Yes"; That's your problem.

    Let's start with your calculation after the header. You set it to * only * run if the current value of the element of your page is null? If this isn't the case, it's your problem.

    Load the Page-> Item set to 'Hand' by calculation-> click on the button--> Item set to STORE-> Submit-> Page Load-> point by calculating the value 'hand '.

    See the problem?

    Assuming that's not the question, you have created a branch to the same page, right? What is your process for the branch point? Is it * after * Validation, computation etc.? Because if not, you are not changing the value before that didn't get to submit.

    I bet that's the first question, but take a look at these.

    See you soon,.

    -Joe

  • Why can I not use hidden or display point only to store the value for insertion?

    Hi, gurus:

    I have a question:

    I implemented a form with the region of report in a page, the update works OK, but the add function has a problem:

    There is a column, offender_ID, which is a foreign key to another table, it must not be null during insertion. However, even I pass the ID of the author of the offence of master page when user click on the button create and he did watch in the form, it must be a text tabled for insert success, why can I not use hidden or display point only to store this value for insert? (If I use hidden or display single element insert will be successful, apex reports I tried to insert a null value for the offender_ID column.)

    Thanks in advance.

    Sam

    Hello

    There is a column, offender_ID, which is a foreign key to another table, it must not be null during insertion. However, even I pass the ID of the author of the offence of master page when user click on the button create and he did watch in the form, it must be a text tabled for insert success, why can I not use hidden or display point only to store this value for insert? (If I use hidden or display single element insert will be successful, apex reports I tried to insert a null value for the offender_ID column.)

    I think that both hidden and display elements have attributes that can cause problems because of different ways these function elements as the only non-display and feature no hidden items. The only items have a "Save Session State' yes/no 'control'? This can be a problem.

    Would you do that? Do these regular items instead and see if you can get those working. Then, we will try to change the fields back to hidden or display only.

    Howard

    Congratulations. I'm glad you found the solution.

    Published by: Howard (in training) April 11, 2013 10:26

  • How set the value of a LOV in CO prgramatically and get the Pkey value?

    Hello

    I need to get the Primaykey LOV will return and set a value for a LOV, say ItemLOV in a page through CO. How can I achieve this?

    Req:
    1. set the nom_element, say "DELL_1618" so that the page displays this in the LOV.
    2 get the PK value returned by LOV in the backend in an attribute of VO say Item_ID, ' 100009881'.

    Thank you
    Sicard.

    Hi Santosh,

    Sorry, I responded to general LOV scenario, but want to put it right,

    You need run your LOV query to the controller for the "DELL_1618" element using the prepared command, get the value of the value display and Id and assign the LOV and FormVlaue in the PR of the controller.

    Kind regards
    Out Sharma

  • How can I get the value of the element checked a box to tick LOV?

    Hi all

    I need to insert rows into a table when a checkbox element is checked.
    The checkbox element is a LOV in a form.
    -----------------------
    Select the DESCRIPCIÓN display_value, ID_DOCUMENTO return_value
    of DOCUMENT
    order by 1
    ------------------------------

    Source
    ------------------------------
    DECLARE
    CURSOR C_REG_DOC IS SELECT ID_DOCUMENTO FROM REGISTRO_DOCUMENTO WHERE ID_REGISTRO =: P6_ID_REGISTRO;
    v_id_documento documento.id_documento%TYPE;
    v_results VARCHAR2 (50);
    Boolean v_first_loop: = true;
    BEGIN
    for this loop C_REG_DOC
    If v_first_loop then
    v_results: = it.ID_DOCUMENTO;
    v_first_loop: = false;
    on the other
    v_results: = v_results |': ' | it.ID_DOCUMENTO;
    end if;
    end loop;
    Return v_results;
    END;
    --------------------------

    I need to create a process to insert rows in a relational table, but I do not know how...
    ------------------
    FOR *? *
    LOOP
    INSERT INTO registro_documento (id_reg_documento, id_registro, id_documento)
    VALUES(null,:P4_ID_REGISTRO,???);
    END LOOP;
    ---------------

    How can I get the value of the active element (id_documento) to insert it?

    Thank you!

    Alex

    Hello:

    You can use the apex_util.string_to_table function to retrieve the values of the LOV as shown in the example

    declare
    arr wwv_flow_global.vc_arr2;
    begin
    arr:= apex_util.string_to_table(:P_CHECKBOX_LOV_ITEM)
    for x in arr.first..arr.last loop
    // insert statement
    iNSERT INTO registro_documento( arr(i) ,.........id_reg_documento,id_registro,id_documento)
    end loop;
    end;
    

    CITY

Maybe you are looking for

  • is it medatory to pay $ 300 to get a DUNS number?

    I want to launch my app in the App Store.  to obtain the DUNS number is imp to enroll as a moral. DUNS asking $ 300 to get a DUNS number. That's kind of extortion. Greetings from Dun & Bradstreet We show you the Questionnaire for your perusal. DUNS p

  • In XP, why can't see a hard drive in the list of workstation?

    I have a hard drive that can be seen in the devices, but also computer management/disk management Manager. But the drive does not appear in the list of workstation hard drives. The spooky part is under run cmd, the drive appears and I can Dir list it

  • When I get out of my Dell Inspiron inactive my computer hangs

    Original title: computer hangs When I leave my Inspiron 1525 idle for an hour or two, the screen freezes and I have to turn off the computer and restart via safe mode.  It is a new show lasts for 2 weeks. I ran various Dell and Microsoft updates and

  • total size of the files of Windows 7 does not match the size of partition

    In the D: partition total space: 265 GB free space: 59.1 GB There is only one visible folder: Daisy, size: 87.4 GB from the Explorer Other records hidden three: info Volume system, c:\Windows\Msdownld.tmp, $RECYCLE. BIN takes up almost no space Of co

  • DGMGRL object NOT FOUND-HELP

    Hello Experts-I have a scenario where I would turn off transport Journal of primary school on physical media by & turn it back as part of PLANNED maintenance.I am facing the following error and I was wondering if you guys can help out me: DGMGRL> con