Pop - up key LOV (description of the poster, returns the value)

Hello

I use this built in functionality to display data from a table, a very simple, just the id and name. Well, it shows me the ID number, the KP but not the name of the Agency

Select * Agency

It restores 1, 2, 3, 5, 4 (so the PK disordered instead of the column name) then I tried SELECT name of the agencies and again it returns me these numbers. I have developed a huge headache, faced with this. I'm doing exactly as in the demo

I chose popup Lov key displays a description...

then in the Source I tried first as in the example

Only when the current value in session state is set to zero + static assignment value corresponds to the source attribute

and I also tried

always replace an existing value and a column of data

and I also tried this trick of adding values static lov.

nothing, at least I get the PK disordered poster.

Of course, if I run it childish query select * from agencies in the sql script, it displays the table very well but when I try to get this value from the popup selector, it will not

I must say that I have included this function within a form, so that the user who fills the form can click on the popup selector to select a value instead of enter manually (to avoid data inconsistencies)

Does anyone know why this strange thing?

Thank you very much

Alvaro

Published by: user12155340 on November 15, 2009 09:21

You must rename the agency_name and the agency_id according to your field name in the table. and so the name of the table.

the syntax must therefore

Select display_value, return_value from by asc

Tags: Database

Similar Questions

  • View the description of the value of fields instead of the id value

    Hello.

    I created a table where the content of the GRAVITY field is a numeric value.
    Then I created a report (SQL query), where I have associated this field a LOV (1 = critical, 2 = major, 3 minor, cosmetic 4 =). I want to know hot to see the description of the value (display value, ex: minor) instead of the numeric value (back), when I submit the report. It's easier when I use a tabular form, but I don't understand how to sami, the same result when you use a normal report (cannot be changed).

    My APEX version is 3.1

    Thank you
    Daniele

    Hello Daniele,

    The title of 'report Attributes"for the report, click on change to the column. The value ' display as ' "display text (based on LOV, does not save the State) ' under the heading 'Tabular form Element' and select a named LOV or define a LOV under the heading"list of values ".

    Thank you
    Machaan

  • srvrmgr syntax: How can I create subsystem named with the name and Description of the values?

    Looking through the library, he did discuss are of syntax that allows you to include the value of name and the named value of the Description of a subsystem/Profile Configuration.  In the screenshot, the circled values were created with the server online order Manager.

    NamedSubsystems.gif

    On the other hand, pouvez create a definition of the element with a name (full name) and a Description.

    For CompDef, it works:
    create the CompDefTest1_enu component definition for the type of component AppObjMgr component fins group run mode interactive full name 'Test Comp Def Test 1' description 'Test 1 CompDef Manager object.

    For named Subsytem, it does NOT work:
    create named subsystem Test5 subsystem EAITransportDataHandlingSubsys full name 'Test 5' description 'Test 5 Description'

    Someone can tell me if there is a good for a named subsystem, syntax to include the name and Description of the values in the command line, or is the only way to create it manually in the UI?

    Hello

    I spent reviewing aid to create the order in srvrmgr, it does not give the full name and description as parameters for the creation of subsystem. However, as you noted these settings are available for creating components definition:

    srvrmgr > help to create

    Create {component group | compgrp}

    [full name: ]

    [{description | desc} ]

    create {definition component: compdef}

    for {component type | comptype}

    {Component group | compgrp}

    run in mode {batch | interactive | background}

    [full name: ]

    [{description | desc} ]

    [with [ param =[, =...]]]

    [[fixparam =[,...]]]

    create the subsystem named for

    subsystem with = [,...]

    Shelf also has an example of creation of subsystem that doesn't include no description, name and first name:

    http://docs.Oracle.com/CD/E14004_01/books/StoreFwdMsg/StoreFwdMsg_InstallConfig14.html#wp1351472

    In this case I suggest that allows you to create a ticket on My Oracle Support to confirm this srvrmgr does not support the creation of a new subsystem with the full name and description settings and request an enhancement for these settings include request in create statement for new subsystems when using srvrmgr.

    It will be useful,

    WSiebel

  • Need help on how to load lov accoding to the value, select locale

    Hello
    My scenario is, I'll have two buttons. A single button for local (English) and another button for local (Nl) Dutch.
    I have a table of database that hold the 2 columns, which are en and Nl.
    I load this value of columns using a Lov
    When I click on the en button, Lov sholud load according to valus in the database column in and when I click on Nl it touches sholud charge Lov according to the values in the Nl column.

    I use a managed Session bean that allows to set the locale.

    I've implemented this scenario, but I had some bad problems.
    (1) my implemented method is not recommended as a best practice
    (2) lov dosagesn can't change until I click a value to this topic.

    In the query select lov, I used the link variable and value as adf.context.expressionEvaluator.evaluate('#{UserPreferences.language}')

    It is not recommended, so please help me to do this with best practices.
    Thank you.

    in your bean writing managed code below

            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, "#{data." +"APPLICATION_MODULE_NAME" +".dataProvider}",Object.class);
    
                AppModuleImpl am =(AppModuleImpl)valueExp.getValue(elContext);       // here AppModuleImpl is the application module Impl class name
                ViewObject myVO = am.findViewObject("VIEW_OBJECT_NAME");
                myVO.setNamedWhereClauseParam("BIND_VARIABLE_NAME", "VALUE_OF_BINDVARIABLE");
               myVO.executeQuery();
    

    and test, hopefully this solves the problem :)

  • Map effective, where the keys never change, but the values change frequently

    Hello

    I need to spend many independent data (DBL, pressure readings) autour points, and they must be accessible by name (channels) from different parts of my program. Rather than having a huge cluster of many elements, I thought using a card.

    My requirements are:

    • The keys are unchanged for the life of the program
    • Values change frequently and at the same time (currently 10 Hz, but it could grow to 100 Hz)
    • All the data is quite low)<100>

    What is the best way to store my data? https://decibel.NI.com/content/groups/large-LabVIEW-application-development/blog/2012/09/04/using-VA... Describes a table of effective correspondence. It seems optimized for fast retrieval of data; I don't know if this is it suitable for the storage of data fast and frequent.

    The 'best' way would be different if I had a large set of data (> 10 000 items)?

    Thank you!

    Less than 100 items with keys of the strings, use the variant attributes and call it a day. For the largest data sets, I'll use a hash of the bucket scheme. The first step maps the keys to one of a fixed number of buckets. Each segment is a Variant, and attributes are used to resolve collisions. I put in other systems that are faster, but there is a cost of complexity of code highly it is really only worth paying if you are curious or that you have a very demanding application. Variants are almost plug and play.

    Your other option would be a memory in the database like SQLite. Good API and enough speed for all but the most demanding applications.

  • Reposition the LOV based on the value received

    Jdev/Adf 11.1.1.4 stack full


    Hello


    I have a table of Bank and an array of countries.

    Each bank has a country.

    The two tables are related through Bank_Country_Nr - Country_Nr

    A VO and EO are created for the table of the Bank.

    Only a VO was created to the country table.

    A transitional attribute for the designation of country of banks has been added to the VO-BankCountryDesignation Bank

    A model based on the list of values was created on the BankCountryDesignation using the VO of the country.

    The lov defines the Bank_County_Nr with the Country_Nr and the BankCountryDesignation with the CountryDesignation

    On the user interface, the BankCountryDesignation has been placed as an af:InputComboboxListOfValues.

    All the functions above as expected.

    Now I have a use case in which a new country is created in another transaction, while the user creates a new Bank and I get the Country_Nr as a page flow scope parameter.

    What I need to do, is to automatically set the af: InputComboboxListOfValues to the Country_Nr received in order to offer the country newly created by the user in the list of values.

    What I have so far is:

    BindingContext bctx = BindingContext.getCurrent ();

    BindingContainer links = bctx.getCurrentBindingsEntry ();

    List JUCtrlListBinding = bindings.get ("BankCountryDesignation") (JUCtrlListBinding);

    list.getListIterBinding () .getViewObject () .executeQuery ();

    Key = new key (new Object() {receivedCountryNr});

    list.getListIterBinding () .setCurrentRowWithKey (key.toStringFormat (true));

    is essentially get the Vo behind the LOV, run the query to pick up the new line, and then set the list on the new line.

    However, I can not the user interface to display the new value, how can it be done, what I am doing wrong?

    Concerning

    Paul

    Thanks for the comments, the code following the deal for me.

    Basically, get the VO behind the list of values, execute the query to pick up the new country

    Find the new country and set with attributes on the vo of the Bank.

    BindingContext bctx = BindingContext.getCurrent ();

    BindingContainer links = bctx.getCurrentBindingsEntry ();

    List JUCtrlListBinding = bindings.get ("BankCoutryDesignation") (JUCtrlListBinding);

    list.getListIterBinding () .getViewObject () .executeQuery ();

    Key = new key (new Object() {receivedContryNr});

    list.getListIterBinding () .setCurrentRowWithKey (key.toStringFormat (true));

    Line currRow = list.getListIterBinding () .getCurrentRow ();

    DCIteratorBinding iter = toolBean.getIteratorByName (iteratorName);

    Line MyViewRowImpl = (MyViewRowImpl) iter.getCurrentRow ();

    row.setAttribute (attributeName, receivedCountryNr);

    row.setAttribute ("BankCountryDesignation", currRow.getAttribute ("Displayid"));

    Concerning

    Paul

  • LOV cannot find the value of the item page

    Hello.

    Ive created a form master detail and I would have a LOV on one of the columns in the report for retail area.

    I created the wizard master detail, when I check that session state the P12_ID is set to the correct value. I can also use the form with no problems.

    Then I try to add the LOV on colum 'USER', choose the dynamic and then typed lov query mode:

    Select
    "display the user."
    "id value.
    of ' #OWNER # '. " Table005 ".
    where "Table010_ID" =: P12_ID

    Then I try to run the page and get this error message:
    ""Unable to bind": P12_ID".

    "ORA-01003: no instruction not analyzed.

    Why can I not call a page of a LOV element in another region?

    How can I solve this problem?

    Thank you...

    Is P12_ID rendered before or after your region in detail? If after, it probably won't work because the question is not really exist yet.

  • LOV using personaliztion is not return a value.

    Guys,

    I have a requirement where I need to add a field to a seeded page. This field must have a value list using customization that must search the EmployeeName but must return corresponding EmployeeId. To achieve this, I followed the below mentioned steps

    1 created EmployeeVO that contains two columns EmployeeName and EmployeeId IN JDEV.
    2. created AM and EmployeeVO annexed.
    3 created EmployeeVORN (/ xxlc/oracle/apps/eam/workplan/lov/webui/EmployeeVORN.xml) and imported.
    4 is went to customization and followed the below mentioned steps
    4.1 has created a MessageLOVinput XX_EMP_NAME with /xxlc/oracle/apps/eam/workplan/lov/webui/EmployeeVORN.xml
    Guest: employee name
    4.2 create a following LOV Mapping EMP_NAME_MAPPING
    LOV box item: EmployeeName
    Point of criteria: XX_EMP_NAME
    Goods return: (empty)
    4.3 create an another following LOV Mapping EMP_ID_MAPPING
    LOV box item: EmployeeId
    Point of criteria: XX_EMP_NAME
    RMA: XX_EMP_NAME

    That's what I've done so far to implement LOV using customization. I can see the name of the employee on the page with the torch trigger. I click on the button of the torch and search for an employee name and after finding it, select using quick selection. But the moment quick selection is made, I see no return value (or EmployeeName EmployeeId) in the region of the employee name field.

    Can guys you please tell me where I'm wrong in the application my requirement. Please help me in this regard.

    Waiting for your response.

    Thank you
    Sunil

    Hey, Sunil,.

    Please close the thred.

    Concerning
    Meher Irk

  • How should I fill out the Description of the channel

    Run the example .vi write channel groups (PDM) and then import the .tdms data in Excel with the Excel add in tool

    How can I enter information in the Description field of 2nd group?

    Thank you

    Hi Zilla,

    Looking at the 'Description' refers to the Description property of each group.  That said, all you need to do is then use the 'TDMS Set Properties.vi"and a cable on behalf of the group you want to set this property to the name of the property (description) and the value you want to store for this property.  Is attached the same vi you mentioned in your post, but I changed to store 'Hello' in a description and 'world' in the other.

    I hope this helps.

  • AF:inputListOfValues sets the value of the first item in the result set when using enter key or tab and component value autosubmit = true

    I use JDev 11.1.1.6 and when I type in a value in an af:inputListOfValues element and press enter or the tab key, it will replace the value I entered with the first element in the set of results LOV. If enter a value, simply click on the component af:inputListOfValues it works correctly. If I use the popup and find a value it works properly as well. I have a programmatic view object that contains a single transitional attribute (this is the view object that is used to create the list of the components of the value of) and then I have another object from view based on entities which defines one of its attributes in a list of the attribute value. I tried to use a base object view of entity to create the LOV to and everything works as expected, so I don't know if this is a bug when using programmatic view objects or if I need more code in the VOImpl. In addition, it seems after that first of the value being replaced by the first value in the result set that it will work correctly as well. Here are some excerpts of important code.

    Also, it seems that this does not work only if the text entered in the component af:inputListOfValues would have only a single game, returned in the result set. For example, given the result defined in code: Brad, Adam, Aaron, Fred, Charles, Charlie, Jimmy

    If we get into Cha, the component works as expected

    If we register A, the component works as expected

    If we get Jimmy, the component does not work as expected, and returns the first value of results IE. Brad

    If we get Fred, the component does not work as expected, and returns the first value of results IE. Brad

    I also checked that I get the same behavior in JDev 11.1.1.7

    UsersVOImpl (programmatic view with 1 transitional attribute object)

    import java.sql.ResultSet;
    
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    
    import oracle.adf.share.logging.ADFLogger;
    
    import oracle.jbo.JboException;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    
    // ---------------------------------------------------------------------
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Wed Sep 18 15:59:44 CDT 2013
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    // ---------------------------------------------------------------------
    
    public class UsersVOImpl extends ViewObjectImpl {
    
        private static ADFLogger LOGGER = ADFLogger.createADFLogger(UsersVOImpl.class);
        private long hitCount = 0;
    
        /**
         * This is the default constructor (do not remove).
         */
        public UsersVOImpl () {
        }
    
        /**
         * executeQueryForCollection - overridden for custom java data source support.
         */
        protected void executeQueryForCollection (Object qc, Object[] params, int noUserParams) {
    
             List<String> usersList = new ArrayList<String>();
             usersList.add("Brad");
             usersList.add("Adam");
             usersList.add("Aaron");
             usersList.add("Fred");
             usersList.add("Charles");
             usersList.add("Charlie");
             usersList.add("Jimmy");
    
             Iterator usersIterator = usersList.iterator();
             setUserDataForCollection(qc, usersIterator);
             hitCount = usersList.size();
             super.executeQueryForCollection(qc, params, noUserParams);
    
        } // end executeQueryForCollection
    
        /**
         * hasNextForCollection - overridden for custom java data source support.
         */
        protected boolean hasNextForCollection (Object qc) {
    
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             if (usersListIterator.hasNext()) {
         
                 return true;
    
             } else {
    
                 setFetchCompleteForCollection(qc, true);
                 return false;
    
             } // end if
    
        } // end hasNextForCollection
    
        /**
         * createRowFromResultSet - overridden for custom java data source support.
         */
        protected ViewRowImpl createRowFromResultSet (Object qc, ResultSet resultSet) {
    
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             String user = (String)usersListIterator.next();
             ViewRowImpl viewRowImpl = createNewRowForCollection(qc);
    
             try {
    
                 populateAttributeForRow(viewRowImpl, 0, user.toString());
    
             } catch (Exception e) {
    
                 LOGGER.severe("Error Initializing Data", e);
                 throw new JboException(e);
    
             } // end try/catch
    
             return viewRowImpl;
    
        } // end createRowFromResultSet
    
        /**
         * getQueryHitCount - overridden for custom java data source support.
         */
        public long getQueryHitCount (ViewRowSetImpl viewRowSet) {
             return hitCount;
        } // end getQueryHitCount
    
        @Override
        protected void create () {
    
             getViewDef().setQuery(null);
             getViewDef().setSelectClause(null);
             setQuery(null);
    
        } // end create
    
        @Override
        protected void releaseUserDataForCollection (Object qc, Object rs) {
    
             Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
             usersListIterator = null;
             super.releaseUserDataForCollection(qc, rs);
    
        } // end releaseUserDataForCollection
    
    } // end class
    
    

    <af:inputListOfValues id="userName" popupTitle="Search and Select: #{bindings.UserName.hints.label}" value="#{bindings.UserName.inputValue}"
                                                  label="#{bindings.UserName.hints.label}" model="#{bindings.UserName.listOfValuesModel}" required="#{bindings.UserName.hints.mandatory}"
                                                  columns="#{bindings.UserName.hints.displayWidth}" shortDesc="#{bindings.UserName.hints.tooltip}" autoSubmit="true"
                                                  searchDesc="#{bindings.UserName.hints.tooltip}"                                           
                                                  simple="true">
                              <f:validator binding="#{bindings.UserName.validator}"/>                       
    </af:inputListOfValues>
    
    
    
    

    I found a solution to this problem. It seems that, when using a view object programmatic that has a transient as its primary key attribute, you need to override the methods in the ViewObjectImpl so that he knows how to locate the line related to the primary key when the view object records are not in the cache. That's why it would work properly sometimes, but not always. Here are the additional methods that you must override. The logic you use in the retrieveByKey would be on a view view object database object and would be different if you had a primary key consisting of multiple attributes.

    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i) {
        return retrieveByKey(viewRowSetImpl, null, key, i, false);
    }
    
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, String string, Key key, int i, boolean b) {
    
        RowSetIterator usersRowSetIterator = this.createRowSet(null);
        Row[] userRows = usersRowSetIterator.getFilteredRows("UserId", key.getAttribute(this.getAttributeIndexOf("UserId")));
        usersRowSetIterator.closeRowSetIterator();
        return userRows;
    
    }
    
    @Override
    protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i, boolean b) {
        return retrieveByKey(viewRowSetImpl, null, key, i, b);
    }
    
  • Set the values in cascade LOV (Skillbuilders SuperLOV used)

    Hello

    I install a simple page with a SuperLOV cascading.

    I'm trying to set the values of the first and the second SuperLOV based on the selection of a report.

    After the selection, a javascript function is called that sets the variable state and browser session P1_EMPNO

    function editRecord(pValue) {
       //set session state of P1_EMPNO to use in pl/sql query
       var a=new htmldb_Get();
       a.add('P1_EMPNO', pValue);
       var r=a.get();
    
       //set variable to trigger dynamic action
       $s('P1_EMPNO',pValue);
    }
    

    I use this point (P1_ITEM) to trigger a dynamic Action (when the value changes AND is not null) to SET the VALUE for the first LOV. This method works.

    Then one created a second dynamic Action that uses the event AFTER REFRESH for the first LOV to SET the VALUE for the second SuperLOV. It does not work

    Just to test the logic, I created a third standard LOV which is the same as the second SuperLOV and respective dynamic action. This one works.

    It's the http://apex.oracle.com/pls/apex/f?p=49044:1 application

    (PATRICK, demoadmin, 1234) application WORDERS.

    I would be very grateful for any help

    Thank you.

    OK, I discovered what was going on.

    I used a $('#P1_EMP').apex_super_lov of javascript for dynamic Action action to set the value of the SuperLOV.

  • 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

  • How to change the values of a from the values selected in another LOV LOV

    Hello

    I have a requirement in the ADF where there are two LOVs. The values in the second LOV based on the values that I selected in the 1st LOV should change dynamically.
    In addition, the 1st LOV accepts 3 values for each value that I select, a different query is executed to fill the 2nd LOV.
    I have a gross thought I can use 3 different read only view objects containing these 3 queries. And according to the value that I select in the 1st LOV I can run the object matching the view of the bean to support. But my doubt is how to link the results of this query that is executed to fill the 2nd LOV.

    Thanks in advance.

    Published by: 886591 on September 21, 2011 04:48

    Kouadio,

    All your queries based on the table? If Yes, you can use a variable binding for the lov attribute relative to the query to run on the LOV child.

    If they are based on different tables, you can create 3 different lovs for the child attribute and select what lov seem based on the parent attribute.

    Here are a few examples.

    http://andrejusb.blogspot.com/2011/03/ADF-BC-dependent-lov-11g-ps2ps3-bug-and.html

    http://andrejusb.blogspot.com/2008/12/Groovy-multiple-lovs-per-attribute-in.html

    Arun-

  • How to increase the width of the value in af:inputComboboxListOfValue

    Hi all;

    I use 11g jdeveloper (Jdev11111). I created the search page with rich table. Inside the table, I have 'af:inputComboboxListOfValues '. Everything works but I'm not able to increase the width of the value in 'inputComboboxListOfValues '. My description and the value is too large, so I need the width to be set. I don't want to increase the width of the component, I want the width to be increased dynamically according to the data.

    Same as in Jdeveloper 11 g update2. In that it is the fine opening

    I can any example of example of this

    Thanks in advance.

    Hello...

    .. .this on thread {: identifier of the thread = 984567}? Perhaps a double post (same theme, almost the same, another user text)?

    As I said in the other thread, check the max-width css tags and min-width.

    Concerning

    Majo

  • Question of value Popup Lov key (description of the poster, returns the key value) by default

    Hello

    I have a Popup Lov key (description of the poster, returns the key value) and I want a default value. It is based on a list (user name, id).
    I tried to put the id of the user logged on as default, but what I see on the screen in the field is the value of the id, not the username.
    How can I pass the user id and see the user name?

    Thank you.

    Oh! My bad, I thought you are talking about regualt lOVs not popups.

    OK, so that's what you need to do, I tried it and it worked for me:

    your popup LOV > default > type: body of the PLSQL function > and enter a query like:

    declare
    UID number.
    Start
    Select user_id from the uid of the user
    where UPPER (username) = UPPER(:APP_USER);

    This should show username and retune userid.

    Hope this helps,

    Sam
    Please give good answers by marking correct or useful.

Maybe you are looking for