DYNAMIC LOV FOR SELECT LIST

hi to all,
i've a question regarding lov query based select list:
For a certain user i need that the lov display a list
if app_user = BACK_OFFICE I NEED THAT ther query on wich is populated the
select list is qry 1.
if app_user is another (consultant) i need query 2 for populating the select list
1) select name|| ' ' || fname D, id K from partner
2) select name|| ' ' || fname D, id K from partner WHERE UNAME=(:APP_USER)
Any solutions would be greatly appreciated.
Another solution would be to have 2 different apps (one for back-office, one for external consultant), but there i should always duplicate all changes to the second one, loosing a lot of time.
Now thinking as well to use hidden fields.
If not clear enough please ask me.
Thanx a lot.
Message was edited by:
Marcello Nocito

I think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
Hope this helps.
Florin

Similar Messages

  • LOV single selection list is not working in my JDeveloper 10.1.2.3

    Hi!
    I'm stumped with this. I'm also new to JDeveloper. I used the sample tutorial from the OTN website entitled "JSPDataBoundLists.jws" to learn how to create drop-down lists in JDeveloper.
    My problem is I created a single selection list LOV from DepartmentListView Data Control and pasted it into an EmployeesView Input form. This is so I can just select the Department names to populate the DepartmentID field in Employees table. I setup the data binding in the UI Model of my jsp using the "List Binding Editor". I checked the UIModel file and it looks as follows:
    <DCControl
    id="DepartmentId2"
    SubType="DCListSingleSel"
    IterBinding="EmployeesViewIterator"
    DTClass="oracle.adf.dt.objects.JUDTCtrlListLOV"
    ApplyValidation="false"
    isDynamic="false"
    ListOperMode="0"
    ListIter="DepartmentsListViewIterator" >
    <AttrNames>
    <Item Value="DepartmentId" />
    </AttrNames>
    <ListAttrNames>
    <Item Value="DepartmentId" />
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="DepartmentName" />
    </ListDisplayAttrNames>
    </DCControl>
    I run the jsp, selected a value from the drop-down list, do a submit and do a commit, but the DepartmentId from the DepartmentsListView was not stored in Employees. What is wierd here is that there is an exact same single selection list defined a row above mine which is working fine. How come that one is working and mine is not?

    Eureka! I finally found the answer to my own question!
    This simple problem of adding a drop-down list into a jsp page cost me 3 whole days (around 24 full working hours) to find the answer. Normally it only takes me a few minutes with the other web app languages I've learned. And I just stumbled into the answer just a few minutes ago (maybe all thanks should be given to God whom let me stumble into the answer since me and my wife have been praying for several weeks now ever since I started trying to learn Oracle JDeveloper. It is really very very difficult and time consuming to learn compared to other web app languages and tools).
    Anyway, the reason why my LOV does not work in my jsps using JDeveloper 10.1.2.3 is because JDeveloper 10.1.2.3 seems to allow only one input-form-element for the same field of the input table!
    For example, what happened to me was I had an input form created for the Employees table in the HR schema. I did this simply by drag-and-drop from the "Data Control Palette". This feature I like very much with JDeveloper. It is really easy and works instantly. And then, I drag-and-drop the departmentname field from the Departments table as a "single selection list" into the jsp and setup its bindings. So when I run the jsp, viola! The drop-down list does not populate the DepartmentId field of the Employees table. IT DOES NOT WORK! I've tried reinstalling both JDev and Oracle db and JDKs to no avail! I tried posting in this forum to no avail! I tried experimenting with newly created jsps to no avail! Then suddenly after repeatedly experimenting on this on different tutorials, guides and my own web app, it works! Why did it work? It was because I tried to add an LOV-single-selection-list on another sample tutorial with a READ-ONLY FORM on the jsp! Thus only the LOV is the input-form-element in the jsp for the table's field.
    So why can't you find such a simple and basic fact anywhere in the web, the tutorials, guides or the forum? I do not know. Maybe only I am using such an old version of JDev? But what about the users who used it when it just got out a couple of years ago? Didn't they have the same problem? Anyway, it seems like the answer to a lot of my simple basic questions about JDeveloper is not documented, or is buried very deep beneath all the other words of all these documents. Hopefully JDeveloper's documentations would get a lot easier to use very very soon!

  • Create a black border for select list item

    Need help on creating border on a select list item.
    I tried using style ="border:1px solid black"; in HTML Form Element Attribute , but its not working for select list item, though it works on text field item.
    Nilesh

    Browsers and versions? (Always supply this information when discussing presentation and UI problem.)
    If it's IE, then this is not possible (at least up until IE7 which is all I can test on at present).
    (As HTML, CSS and JavaScript exist outside of APEX, you should search more widely than just OTN when looking for information on these topics.)

  • Dynamically changing the select list in an LOV based on the login user

    We have a field in a form which is a combobox.The form is to be linked to different profiles of users.Based on the logged in user we would like to restrict the select list in the LOV.ie user1 should see a LOV which is different from that seen by user2.Is this possible.If so how can this be done?Kindly reply.
    Thanks & Regds,
    Jayanthi

    Thanks for ur reply.But my problem is that i have a table having details of some products which includes spareparts also(Name,id,price etc).In my form i have the combobox field which should have a list of these products which the user can select.Now depending on the user's profile he should see only his related products(One profile of users should view only the products but not the spares while the other should view only spares.)The details of both the products and spares are in the same table.we have a criteria to differentiate between the products and the spares.The LOV should display at run time, either products or spares depending on his profile as he logs in. Hope u understood my problem.
    Regds,
    Jayanthi
    Hello Jayanthi,
    I had a similar situation in my last project.
    While you can solve this by modifying your query, this will always come around as may be later some other criteria to restrict based on User/His Role/Something else. Hence I fixed it at design level itself. Though I can't give my situation I can tell you the solution applying my logic.
    Altering your Product Table and adding one more database Column say Product_Category and updating the table with Product Category =1 for Products and 2 for Spares. You can extend this further for other types.
    Create a new Table say User_Groups that will have
    Group_id
    Group_Name
    User_Id columns and will contain all the User ids inserted groupwise.
    Create one last Table Group_Product_Map
    That will have
    Group_id
    Category_id
    This will store each Group_Id followed by Category_id of Products to which these group members will have access to.
    Now write a database function getCategory( p_User) which will query User_Groups table to get Group_Id
    and further query Group_Product_Map Table based on group_id to get Category_Id.
    This function will return category_id.
    Huh!
    So your LOV will have a query as select *(or whatever) from Product where category_id = getCategory(portal30.wwctx_api.get_user)
    Hope this helps
    Madhav

  • DA for Select List is not working

    Hi friends,
    I have a two fields in my form.
    <li>person id
    <li>Manager Name(Select List)
    I have given a default value for person id as'270'. So i need to write an dynamic action so that it will fetch the manager name according to the person id '270'.
    Since My manager Name is an Select List type, i have given the following query in the LOV definition of this item
    select papf.full_name d, papf.person_id r
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145
    order by 1   This is the DA, that i wrote for the person id column.
    For the true action, i have given as 'Set Value' and given the following query
    select supf.full_name
    from per_all_people_f papf,
         per_all_assignments_f paaf,
         per_all_people_f supf, hr_all_positions_f hapf, hr_all_organization_units haou
    where papf.business_group_id = 216 
    and papf.person_id = paaf.person_id and hapf.position_id=paaf.position_id and haou.organization_id=paaf.organization_id
    and  NVL(paaf.supervisor_id, papf.person_id) = supf.person_id
    and sysdate between papf.effective_start_date and papf.effective_end_date
    and sysdate between paaf.effective_start_date and paaf.effective_end_date
    and sysdate between supf.effective_start_date and supf.effective_end_date
    and sysdate between hapf.effective_start_date and hapf.effective_end_date
    and papf.person_type_id = 5145 and papf.person_id = :P6_PERSON_IDPage item to submit: P6_PERSON_ID
    Affected Element: P6_MANAGER_NAME.
    Soon after the page load, the manger field has to show the corresponding manager name in the LOV according to the value '270' which is in the person id item. But it is not showing the corresponding name in the select list item.
    Suppose, if the manager name item is in 'display only' means it is working, but if the manager name field is in LOV means it is not fetching the value and it is displaying only the null display value in that field.
    I dont know why the DA is not working if the field is in LOV.
    Brgds,
    Mini

    Hi Patrick,
    Thanks, and this is the mistake that i made and it worked now fine.
    I have Certain questions for you:
    <li> Currently, i can able to send mails from APEX using APEX_MAIL, but APEX_MAIL will support only in the unauthenticated mail server. Since in our organization we have configured an unauthenticated mail server and we are using that server for the APEX mail process. The problem that im facing now is, this mail server is been used in our organization entirely for all the purpose, except the official mail.[For official mail purpose we are using Yahoo server, which is an authenticated server, and we are using that Yahoo mail server only for your official mail purpose].
    For remaining all the purpose including the APEX mail process too we are using the unauthenticated mail server that we configured. Since we are make using of unauthenticated mail server for all the purpose and due to that, the mail process is getting very slow and i couldnt able to receive the mail from the APEX in time(via) this unauthenticated mail server.
    So, due to that i thought of using the Yahoo mail server(which is an authenticated mail server). But APEX_MAIL doesnot support for the authenticated server, then how i can use the authenticated mail server for sending the mail via APEX. How i can able to access the Yahoo mail authenticated server from Oracle Database.(i have also enabled ACL in my DB too).
    <li> Second question, is how i can able to refer the APPLICATION PROCESS in my application. Other than calling that APPLICATION PROCESS In javascript, it is possible to call that APPLICATION PROCESS in the plsql anonymous block.
    Brgds,
    Mini

  • Can I have a LOV for display and a LOV for select values in a form ?

    My LOV are in table :
    lov_return, lov_display, lov_available
    To avoid a loss in translating lov_return in lov_display values, I manage a flag, lov_available, Y/N to filter out obsoleted values.
    By example, at the beginning of using the application, I have :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    Y
    3
    BOTTOM
    Y
    And I have records with 1, 2 or 3 in the field corresponding with the LOV.
    So far, so good.
    Then I want to have a slightly different set of values in my LOV, for new records :
    LOV_RETURN
    LOV_DISPLAY
    LOV_AVAILABLE
    1
    TOP
    Y
    2
    CENTER
    N
    3
    BOTTOM
    Y
    4
    CENTER-TOP
    Y
    5
    CENTER-BOTTOM
    Y
    So, when I edit an old record in my form, I want the 2 to be well deciphered into CENTER, and in the SELECT list, I want TOP,BOTTON,CENTER-TOP,CENTER-BOTTOM.
    When I assign the dynamic LOV : select lov_display d,lov_return r from lov_table where lov_available = 'Y', to the corresponding field in my FORM, even allowing extra values will not help and will display '2' instead of 'CENTER'.
    Is there a way I can manage to show the translated 'CENTER' in the field, and offer a list of values taking in account the 'availability' of the value, other than including the PX_FIELD test in my SQL for the dynamic LOV ?

    A common logical problem I encountered back the days of Oracle Forms.
    A solution I often see is displaying invalid options with an asterisk, and applying validation to ensure users don't change to invalid selection.
    No doubt there are some clever ways to tart this up with jQuery, also.
    Scott

  • Dynamic LOV displays empty list

    Hi,
    I use the following sql in my dyncamic LOV, but it always gives an empty list. However, the sql does return values when run in sqlplus. Any ideas?
    select p.description, p.id
    from person p,
    customer c
    where p.customer_id = c.id
    and c.description = :p2_customer_description
    Thanks

    I think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
    Hope this helps.
    Florin

  • Dynamic Population of Select List

    I am stuck in a very frustrating situation at present, I need to dynamically populate select lists based on user choices.
    There are three drop down menus, only the first one is pre-populated with the other two populating upon user selection of the previous one. I am using JSP and JavaScript in conjunction. I need to make a function call to a back-end library which exists on a servlet to get the data for the 2nd and 3rd drop down menus, the parameter for the function being the user selected option in the 1st drop down menu.
    I know I cannot use the JavaScript "onchange" event handler as that won't help me call the back-end library functions. One way that I think is feasible at the moment is to do page refreshing, i.e. include other JSP's in one main JSP and refresh them as soon the user makes a choice. The other way is to embed an applet in a JSP page and use the JComboBox from the Swing libraries to detect events and make HTTP connections to servlets. I believe there is a possibility of using Struts to do this as well. Can someone tell me which would be the best method to use and a general overview of how to go about using it? I am also open to other alternatives...
    Thanx for any help in advance

    this can be done in two ways.
    one way:- try generating a hidden form fields with the values comma seperated.
    like <input type='text' id= id1 name = select1 value = 'coma seperated list of second select values' >
    on on change event you can get the list of values which you need to populate in the second select box. generate the options dynamically by splitting the coma seperated list into the second combo.
    second way:- while loading the jsp store all the second select box coma seperated list in java script array. and based on the change event of first select box get the corresponding values from the array and split them and generate the options dynamically and populate the second select box.
    I guess this way you can solve your problem.
    write back to me on [email protected] if you need code snippets.
    all the best
    kiran J

  • Dynamic variant for select option High value

    Hi ,
    Please help me in creating dynamic variable for a select option date field high value.
    II tried the following method:
    1. Enter the values in the selection screen
    2. Save the variant using the SAVE button
    3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
    4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
    5. Click on the down arrow button and select the option 'Current Date'.
    5. Save the variant.
    But it is saving the date value in Field LOW of select option( From value).
    I need it in TO field( High value).
    Please help.
    regards,
    Sheeba

    Hi Sheeba
        we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
    I guess this would throw you same results as that of the value in the high value button
    Cheers,
    Jacks.

  • Dynamic Actions in Select List of Tabular Form

    I have a tabular form in my application and one of the column A is Select List with lot of values. My requirement is, there is another column B in the same tabular column like Display text, which should appear when a user select A, B or C in the select list column A. Is it possible, how can I implement it?
    I tried it through Dynamic Actions ->DOM Objects, but I am not sure what is the name of the Select List column value that needs to be specified, it is jst f06 or f06_???. Can someone tell me the exact steps that needs to be followed.

    My mistake, Javascript (and DOM attributes/methods) are case-sensitive. The attribute in question is readOnly, not readonly
    I fixed it on my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:255
    <script type="text/javascript">
    function ro_Item(nd,a){
        var lEl = html_GetElement(nd);
        if (lEl && lEl != false){
           if(a){
          lEl.readOnly = true;
          lEl.style.background = '#cccccc';
        }else{
          lEl.readOnly = false;
          lEl.style.background = '#ffffff';
         return true;
    function foo(pThis)
    var lTD=pThis.parentNode;
    var nextinput=lTD.nextSibling.getElementsByTagName('input')[0];
    var nextnextinput=lTD.nextSibling.nextSibling.getElementsByTagName('input')[0];
    if (pThis.value=="CLERK") {
      ro_Item(nextinput,true);
      ro_Item(nextnextinput,true);
    else {
      ro_Item(nextinput,false);
      ro_Item(nextnextinput,false);
    </script>

  • Define default value for Select List

    Hello,
    I have an Item on the page, which is a Select list
    And I have a LOV associated with this item, which is a database query.
    How do I make one of the values of this LOV to be a default value of this Select list?
    I need this value to be displayed first, instead of a Null value.
    Thanks!

    That's right - use the Default value area of your Item definition.
    Have a look at this post:
    Re: previous selected option as default value
    May be you will find it useful...

  • Tool tips for selection list

    I want to display a tool tip for the values in a selection list in a HTML form in a JSP page. I have tried setting the title attribute on option tag but it does not work.
    Does anyone know how to do this?
    Thank you in advance

    bump

  • Dynamic LOV FOR TABULAR FORM 6i

    Hi,
    I have tabular form of two Items(ID,DESC) and I want to Populate LOV for item(ID) every record
    and record_Group & SQL statments are stored in DB.
    ACTION: when query in POST-QUERY Trigger get for every record in tabular form -- the stored SQL-Statment from table then put it into dynamic record_group and populate the dynamic LOV.
    Please advice,
    Thanks in Advance.

    OK daniel
    This form used for get reports
    then header get the name of Report (Table-A) (report_ID),(report_desc).
    then details for get the Parameters will send to report builder (Table-B) (detail_id),(report_id),(sql_stm).
    so parameters may be need for example stock code so this record need to query from stocks table to get stock code and stock name.
    next record for item Code so need to query from Items table to get the Item code and Item name
    another report for employees so the user enter report code then when query and get in details block employee code and employee name.
    so the lov will check if this record have query sql-statment or not if have execute it in the record_group then in lov
    then go to the next record if sql_stm is null then no lov in this record and so on.
    thanks..

  • POP UP LOV vs Select List

    If I do this as a select list then the user can select the friendly value and the column will be updated with the
    columnid. When they select the display value it is reflected on the screen as such, the display value
    select mycolumn d, columnid r
    from mytable
    order by 1;
    If I do the same as a Pop UP LOV the user can select the friendly display value and when they do
    the text field is populated with the columid, the return value and not the display value. How can I use
    a Pop up LOV and when the user selects the display value have that reflected on the users screen. I want to use the Pop Up LOV so that the user can search through possible values.
    Thanks
    Steve

    uhhh...never mind, should have searched the forum first - found the answer!

  • Dynamic Parent/Child Select List - Parent may have only a single entry

    Hello,
    I have a parent/child select list implemented using APEX only, ie no AJAX.
    The child list always has multiple entries, but the parent may only have a single entry, depending on who is running the application. When the parent has just one entry it can't submit, so the child list remains empty. Also when the parent has multiple entries, the user must select another entry from the parent list to cascade the child list.
    I have put a button to fire the branching to same page submit, but this is a little clunky. Is there a way of cascading the child list when the page opens? Preferably without ajax, but if has to be then ok
    I've looked for an answer to this but all threads I have followed seem to assume parent to have multiple entries, and that child list requires parent selection, but this not so in my application.
    Thanks, Jock

    Anyone?
    Even an acknowledgment that this should be obvious to me, or that it is not currently possible would be of assistance.
    Thanks,
    Jock

Maybe you are looking for

  • How can  Parameter passing Form 6i to Report 6i

    Hi, I want to send a parameter from the Form 6i to run a report 6i which is used in where clause of a query. Who can I send this parameter??? Please send me solution of this problem. Shahzad

  • Help with Shockwave player reinstall

    I recently updated my system (PC, Windows 7, updated to IE 11), and the shockwave player needed to be updated. Tried to do that, but won't work. My system is 64 bit, but the IE 11 running is 32 bit version.  Tried numerous ways to update, then I remo

  • Forms/Designer 10g - problem with attached libraries

    I've problem with forms with attached libraries. All of libraries have removed paths. I can run all forms without any problem on my local application server from Forms Builder 9i or Designer 9i. I added all paths in registry FORMS90_PATH. WORKINGDIRE

  • Lence flare plugin for premiere pro cc

    I need some help finding a great lence flare plugin 3d for premiere pro cc. Can somebody direct me to the right stuff ..   Thanks .

  • Crviewer and changing database

    the tutorial on  Adding Ability to Change Database Location at Runtime says In this tutorial you will change the name of the Database server, not the name of the Database.   It is not possible to change the name of the Database with the CrystalReport