How to create a list of value based on a variable?

Hello

How can I create a LOV based on dynamic information, if what I want is to have a sql statement to create the LOV like this:

Select name, id
users
where users.group =: VARIABLE_GROUP
by name

Thank you
J

Hello

You create the LOV well enough as you have your example. Use the name of the variable that contains the value you want to use for users.group, in general, on a page that is initialized during the loading of the page, or some criteria provided by the user.

I do it all the time. For example...

Select project name, project
projects
where state_id =: P1_STATE
state_id order;

: P1_STATE is defined by a query that runs on my 1 Page that looks at the State of origin for the user who is logged in the system. This LOV then displays only the projects for their own State.

Thank you
Don.

Tags: Database

Similar Questions

  • How to create a list of values

    Hi everyone, this is my use case

    There is a table A and a B. There is also a C table that is related to these two table in many to many relationships.

    TABLE A

    Help Name
    1
    2
    3

    TABLE B

    Auction Name
    1
    2
    3

    TABLE C

    CID - help - submission - name
    1 - -- - *1* - -- - +1+
    2 - -- - *1* - -- - +2+
    3 - -- - *2* - -- - +1+


    So if I choose to help either 1 in TABLE C, then the list of bid amounts should show as 3. Is it possible to do?


    Thanks in advance.


    Note:
    The aid is in bold
    Submission is in italics
    I used dashes to make it look like table.
    I am new to this editor.
    Excuse my ignorance.

    Hello
    According to my understanding, you meant that you should have a unique value in the combination of A & B.
    If so,.
    You can create a key to spare with the A & B fields in the entity and validate it against a Unique constraint.
    Then the user can select a combination more than once.

    See the link
    http://www.gabrielsideras.com/2010/09/28/ADF-unique-key-validation/

    Rognard

  • How to get a prompt to return a list of values based on a prompt

    Hello
    In the link below, I show the chain and the guest of the station.
    The guest of the station must return a list of value based on the value I have insert for string.
    If for example I have insert FS for the Four Seasons chain, what resort it must return only the hotels belonging to four seasons.
    I tried as in the example with a variable, but not worked.
    Any idea?

    http://img163.imageshack.us/img163/4486/resortprompt.jpg

    Thanks and greetings
    Giuliano

    Hello

    Do you have values for the stations for the value of the selected channel. I assume that you have no station for the selcted string value values. Try to select values of chain of 5 or 10 and then check the value of the station. To force them to work there is no need to define any variable presentation.

    Kind regards
    Sandeep

    Published by: Teresa Sanchez on 10-Sep-2010 01:25

  • How to create a list of chips which is aligned which can occur over time (such as powerpoint)

    Hi all. I'm trying to figure out how to create a list of chips for a training video that will appear gradually as the voice on reveals each point, without the need to have a separate title for each point. Even if I create bullets, especially how to align and having the good spacing between each sentence. Basically I want it to be like an animated Powerpoint slide! Please can someone give me advice on how to do this than all my text/bullet alignment points and are spaced evenly. Thank you!

    Each line is revealed over time:

    Title

    • Point 1
    • Point 2
    • Point 3

    Do in the Titler, and start with the complete list of ball.

    Then create "new title based on the current title" and remove the bottom line

    Do so until that there is only a line on the left.

  • Create a list of choices based on users

    We use 2 of custom object to track additional customer information and would like to add a list of choices, customized with the values in the list of all users; basically a second field 'owner '.

    Is it possible to create a list of choices based on users?

    Thank you.

    Hello

    Yes, of course; a drop-down list can be created on any BC, there is a BC called 'User' just so build the list of choice in this.

    Kind regards

    Matt

  • How to complete the list of values when loading screen

    Hi all

    I have a list of values based on another field (ANOTHER_FIELD).

    for example
    Select the value d, r
    from table_name
    where id =: ANOTHER_FIELD;

    ANOTHER_FIELD has a default value.

    But when the screen is opened to the list of values does not have the default value and the values list is empty.
    Just when it is filled with submission of the form, the list of values.

    Please tell me how can I complete the list of values when loading screen.

    Thank you!

    Hello

    It depends on how you have defined the default value for ANOTHER_FIELD.

    I always set my default settings using a calculation, that runs before header, on the element that defines the value using a static assignment, but to ensure that the calculation is dependent on the order of the day being NULL - try this

    Andy

  • How to create a list of button by using the names of a table

    Hi, I want to create an application that displays detailed information about something. for example, as the profile of the users. my application will read an xml response from the server that contains the list of the names of the users. How to create a list of buttons using the names and then each button that displays the name that can be pressed and displays detailed information about the name? I think that it is similar to the BBM app that displays a contact list of the user. Thank you very much

    Create a ButtonField as:

    ButtonField [] users_buttons = new ButtonField [number of users];

    Initialize the uasing dem:

    for (int i = 0; i)<>

    users_buttons [i] = new ButtonField ("user", Field.FIELD_HCENTER |) ButtonField.CONSUME_CLICK);

    Make dem clickable setchangeListener method of buttonField and Ooveride Navigation click to make a few operatoin by clicking on the specific button!

  • How to connect a list of values to the regions

    Hi all

    I created the list of values like the bar chart, histogram, Pie Chart.these the list of values added to the text box named as a type of cat.

    In the same region, I created 3 chart under regions.

    My requirement is if I select the graph page type-pie chart.the will see the pie only graphic region only. Even at the bar graph and histogram also.

    Please tell me clearly.

    Please help me.

    Thank you and best regards,

    Rambeau

    Amandine says:

    But I have 2 questions.

    1, where we give value to the element of LOV

    I created the list of values like the bar chart, histogram, Pie Chart.these the list of values added to the text box named as a type of cat.

    When you say "text field", do you mean literally a text element? If so, why do you use it? A select list or radio group would generally allow to select the chart type.

    Usually the user "will give the value" (for example, select the desired option). You can provide an option by default when the page is rendered first with a header of computation that runs under certain conditions, if the value of the element is set to zero. (You must use a calculation for this rather than the property item by default so that the value is in session state to operate in conditions of graphic region.)

    2, please give some examples of Expression1.

    Expression 1 is the name of the element used to display the options. Following the convention of the APEX of prefacing names to page elements to make them unique, it will be something like P2_CHART_TYPE.

  • How to create the table with value list/map binding

    I need to display some values in a tabular format. It is possible to create a table adf without having value binds to a VO object. I can make a table with a combination of list/map.

    I want to change the format of display with minimum change in the application. I therefore seeks a change to a list/map and map with the table.

    Here is the structure in that I need to post.

    _______________________
    |     | Header1. Tete2 |
    |_______|_______|_______|
    | Txt R1 | value 1. Value 2.
    |_______|_______|_______|
    | Txt R2 | Value 3. value 4.
    |_______|_______|_______|

    All views is completely irrelevant. So I should not create a VO and add the VO object lines.

    Published by: yannick June 10, 2011 11:34

    Yes, you can do it. Create a pojo with properties (column) that you want to display in the table and create a list of instances of the POJO and then you can fill your table using the list.

    Sample:

    //POJO
    public class SamplePojo {
    
    private String col1;
    private String col2;
    
    public SamplePojo(String col1, String col2){
      this.col1 = col1;
      this.col2 = col2;
    }
    
    //add setter and getter methods
    }
    
    //Inside bean, prepare a list with pojo instances (Assume a getter exists for pojoList)
    pojoList = new ArrayList();
    pojoList .add(new SamplePojo("Value1", "Value2");
    pojoList .add(new SamplePojo("Value3", "Value4");
    etc.
    
    //Inside jspx
    
       
         
       
       
         
       
    
    

    HTH
    Jean Lou

  • Create a list of values (Lov) programmatically

    I need to dynamically create the ListOfValues during execution.

    For this, I found a few links, in which it is explained how to create the ViewAccesor and the ListBindingDef which defined the Lov in the model project.

    Andrejus Baranovskis Blog: The ADF for BC and dynamic ADF ADF UI generator

    Binary: Activation for dynamic attributes ViewObject LOVs

    This kind of list of values can be rendered with the component, af:dynamicComponent, but I want to use them with the original component.

    The main problem is that: a dynamic list of values attributes do not have listOfValuesModel in the exposed binding.

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

    Model = "#{Bindings.ComunidadAutonoma.listOfValuesModel}"-> This property is empty in an attribute with a dynamic lov, at the same time, it exists in a standard attribute with lovs. "

    I could check bindings exposed during this attributes are different too.

     <attributeValues IterBinding="ProvinciasIterator" id="ComunidadAutonoma">
          <AttrNames>
            <Item Value="ComunidadAutonoma"/>
          </AttrNames>
        </attributeValues>
        <listOfValues IterBinding="ProvinciasIterator" StaticList="false" Uses="LOV_Nombre" id="Nombre"/>
    

    To solve it, I thought that I could create the ListOfValuesModel of the ListBindingDef and the ViewAccesor dynamically exposed in a managed Bean, but I don't know how he.

    public class MyBean {
    
    
      public MyBean() {
        initListOfValuesModel();
      }
    
    
      private ListOfValuesModel listOfValuesModel;
    
    
      public ListOfValuesModel getListOfValuesModel() {
        return listOfValuesModel;
      }
    
    
      private void initListOfValuesModel() {    
        DCBindingContainer bindings = getBindings();
        JUCtrlValueBinding attrBinding = (JUCtrlValueBinding)bindings.get("myAttrib");
        ViewAttributeDefImpl attr = (ViewAttributeDefImpl) attrBinding.getAttributeDef();
        ViewDefImpl viewDef = attr.getViewDef();
        ArrayList<ListBindingDef> listBindings = viewDef.getListBindingDefs();
        ListBindingDef lbLov = null;
        for (ListBindingDef listBinding : listBindings) {
          if (listBinding.getListVOName().equals(attr.getLOVName())) {
            lbLov = listBinding;
            break;
          }
        } 
        ...
        //listOfValuesModel = ;
      }
    
    
    
    
    
    
    
    
    

    Another solution would be resolved in the code of the ad: dynamicComponent, because it could render the ListOfValues I programmatically add.

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

    Code for adding programmatically to a lov

        private void buildLovVO(String voName, String voPath, String sql, Set<DataBindVar> bindVars, List<String> labels) {
            ViewDefImpl lovDef = new ViewDefImpl(voPath);
            lovDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
            
            lovDef.setQuery(sql);
              
            lovDef.resolveDefObject();
            lovDef.registerDefObject();
            
            if (bindVars != null && bindVars.size() > 0) {
                VariableValueManager vvm = lovDef.ensureVariableManager();            
                for (DataBindVar bindVar : bindVars) {
                    VariableImpl lovBindVar = (VariableImpl)vvm.addVariable(bindVar.getBindVarName());
                    lovBindVar.setJavaType(bindVar.getBindVarType());
                    lovBindVar.setVariableKind(VariableImpl.VAR_KIND_WHERE_CLAUSE_PARAM);
                    lovBindVar.setProperty(AttributeHints.ATTRIBUTE_DISPLAY_HINT, AttributeHints.ATTRIBUTE_DISPLAY_HINT_HIDE);   
                }
            }
            
            if (labels != null && labels.size() > 0) {
                ViewObjectImpl lovVO = (ViewObjectImpl)app.createViewObject(voName, lovDef);
                for (int i = 0; i < labels.size(); i++) {
                    ((AttributeDefImpl)lovVO.getAttributeDefs()[i]).setProperty(AttributeHints.ATTRIBUTE_LABEL, labels.get(i));   
                }
            }
        }    
        
        
        private void buildListDef(ViewDefImpl dViewDefImpl, String viewAccessorName, String lovName, 
                                String listDataSourceViewDefName, Set<DataBindVar> bindVars, List<String> attribNames,
                                List<String> listAttribNames, List<String> listDisplayAttribNames) {
            ViewAccessorDef vdef = new ViewAccessorDef();
            vdef.setName(viewAccessorName); 
            vdef.setViewDefFullName(listDataSourceViewDefName);
            vdef.setRowLevelBinds(true);
            
            if (bindVars != null && bindVars.size() > 0) {
                for (DataBindVar bindVar : bindVars) {
                    vdef.getBoundParameters().addBoundParameter(bindVar.getBindVarName(), bindVar.getBindVarValue());
                }
            }
            dViewDefImpl.addViewAccessorDef(vdef);
            
            //---------PREPARAR STRING ARRAYS PARA LA FUNCION buildListBindingDef ------------//
            String[] strAttribNames = attribNames.toArray(new String[attribNames.size()]);
            String[] strListAttribNames = listAttribNames.toArray(new String[listAttribNames.size()]);
            String[] strListDisplayAttribNames = listDisplayAttribNames.toArray(new String[listDisplayAttribNames.size()]);
            
            ListBindingDef listBindingDef = buildListBindingDef(dViewDefImpl.getDefManager(), viewAccessorName, lovName,
                strAttribNames,
                strListAttribNames,
                strListDisplayAttribNames);
            dViewDefImpl.addListBindingDef(listBindingDef);  
        }
        
        private static ListBindingDef buildListBindingDef(DefinitionManager defMgr,
                                                         String listVOName,
                                                         String listBindingName,
                                                         String[] attribNames,
                                                         String[] listAttribNames,
                                                         String[] listDisplayAttribNames) {
            ListBindingDef lstbindingDef = new ListBindingDef(defMgr, DefinitionObject.DEF_SCOPE_PERS);
            lstbindingDef.setListVOName(listVOName);
            lstbindingDef.setName(listBindingName);
            lstbindingDef.setListRangeSize(-1);
            lstbindingDef.setNullValueFlag(AbstractListBinding.LIST_ADD_NULL_NOWHERE);
            lstbindingDef.setNullValueId("");
            lstbindingDef.setAttrNames(attribNames);
            lstbindingDef.setListDisplayAttrNames(listDisplayAttribNames);
            lstbindingDef.setListAttrNames(listAttribNames);
            
            return lstbindingDef;
        }
    

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

    JDeveloper 12 c (12.1.2.0.0)

    You can download code for ADF Rich Client Demo application (ADF Faces Rich Client Demos ) and see what the code is behind the af:inputListOfValues example (LOV in this example is populated by managed bean).

    If you need create liaison for lov programmatically, and then read this blog post: ADF practice: dynamic linking LOV

    Dario

  • How to create a list for the tabs 2nd level

    Dear Experts

    I created a view
    CREATE OR REPLACE FORCE VIEW  "MY_VW_TABS" ("APPID", "PTTARGET", "PTTABNAME", "PTTABLABEL", "TABNAME", "TABLABEL", "TABPAGE") AS
      select pt.APPLICATION_ID APPID,pt.TAB_TARGET PTTARGET,pt.TAB_NAME PTTABNAME,pt.TAB_LABEL PTTABLABEL,t.TAB_NAME TABNAME,t.TAB_LABEL TABLABEL,t.TAB_PAGE TABPAGE
    from APEX_APPLICATION_PARENT_TABS pt,APEX_APPLICATION_TABS t
    where t.tab_set = pt.TAB_NAME
    and pt.APPLICATION_ID=t.APPLICATION_ID
    order by pt.TAB_NAME,t.TAB_NAME
    I need to create a dynamic list based on this view of the * 2nd level tabs * (of my model of two-level tabs page), to be used in a region bordered on page 0. However, I found that the code in the list should be as follows:
    select level, labelValue label, 
           [targetValue]            target, 
           [is_current]             is_current_list_entry,
           [imageValue]             image, 
           [imageAttributeValue]    image_attribute,
           [imageAltValue]          image_alt_attribute,
           [attribute1]             attribute1,
           [attribute2]             attribute2,
           [attribute3]             attribute3,
           [attribute4]             attribute4,
           [attribute5]             attribute5,
           [attribute6]             attribute6,
           [attribute7]             attribute7,
           [attribute8]             attribute8,
           [attribute9]             attribute9,
           [attribute10]            attribute10
    from ...
    where ...
    order by ...
    Now, I have two questions:
    (1) how to use the view above to be used in the code of dynamic list?
    (2) is a good way to create a list for the tabs 2nd level?

    Best regards
    Mahmoud

    Mahmoud

    Are you sure that you view is correct?

    >

     where t.tab_set = pt.TAB_NAME
     
    

    Should be

    where t.tab_set = pt.current_for_tabset
    

    Nicolette

  • How to create the list in SDK v5.0

    Hello

    I have SDK 5.0 with me.

    I want to create a list as in the SDK v6.0but sdk v 5.0 software

    for example, for version 6.0

    MainManager Manager = getMainManager();
    SimpleList listField = new SimpleList (mainManager);
    listField.add ("Item 1");
    listField.add ("Item 2").
    listField.add ("Item 3").

    Can someone help me in this creation.

    When I want to go find info according to the selected item in the list.

    Also, please tell me how to select the item.

    Thank you

    Afonso

    Problem solved

    listF.getSelectedIndex () used;

  • How to create a list of the order of the day?

    Hello

    I'm trying to create a simple list of the order of the day in Adobe Muse with about 4 rows that includes the date, time and description for each line.

    How can I create a list like this? It would be great if my client to add a new course (with date and discription) in chronological order.

    Registration for the course and nothing is not required.

    Is is possible to build a list like this in the Muse?

    Thanks in advance.

    Schermafbeelding 2016-02-02 om 15.13.32.png

    You can not dynamic stuff in Muse with the exception of third-party widgets. Everything else requires a dynamic interface, so no, you want to do is not possible. You can of course keep a list manually, built from whatever elements you deem appropriate.

    Mylenium

  • How to create a list of icon button similar to the application of the timesheet

    Hello
    Can someone tell me how to create an icon, with drop-down list that looks like and similar to the button work, we can find in the application of the timesheet in the following URL: http://apex.oracle.com/pls/otn/f?p=35222:LOGIN

    Thank you!

    Hello
    Click on your list box
    Click on the name of the list
    It is redirects to the list property
    Choose the name of the specific list item, that it will open for the parameter of the attribute
    Choose the small button on the right image will pop up the existing images or
    Download your [shared components] Access image #APP_IMAGES #image1.gif

    Thank you
    Loga

  • How to create a list of permissions in the wizard for registration of components?

    Dear friends,

    Hello. I have just finished developing my first PeopleSoft application in the Application Designer and try to save the component using the registration wizard. I have 2 questions:

    When to use select button to select an allow list, first of all, there is no list of permission to select from my computer. So creating a list of permissions in the registration wizard?

    Secondly, in content reference window, click the "select" button to select the name of the portal and the name of the folder. Then click on the button "Open Selected", it is supposed to launch a browser that takes the administration page to create a new folder if necessary. But in my computer, the browser is a message: "page cannot display." What is going on?

    Friends can help answer these 2 questions? Thank you.



    Lucy

    Lucy,

    You cannot create a list of permissions in the registration wizard, only selection from a list of those that already exist. Note that when you choose the selection... button, there is another selection button in the popup window that acts first as a search button, and assuming that it returns a list of highlight or authorization lists you want to include and use the Select button. You can enter search criteria before using the Select button, or leave it blank to see everything.

    In response to your second question, the selected button open for content references will not work unless you set the URI correctly on the browser under Tools-> Options tab in the App Designer.

    Kind regards
    Bob

Maybe you are looking for