LOV referencing a LOV

I have a report which displays information on a cities.
I would like to be able to have the user select country/state/city in the customization screen using LOV's. This means the State LOV would need to change as a result of the Country LOV and likewise the City LOV would have to change as a result of the State LOV.
I know how to do this on a Form, by refreshing the Form, but I haven't been able to do it in the customization Screen.
Any ideas would be appreciated.
Thanks, Larry

Hi Larry,
What you require can be done using an onchange trigger in the comboboxes and a Javascript array.
Basically on change of the Country SELECT list, all of the OPTIONs are removed from the State and City SELECT lists and only the valid ones added.
This will make for a large page, as it has to hold the entire list of Countries, States and Cities, plus the script to set them straight.
The advantage to this method as opposed to using PL/SQL is that the form is not submitted and is therefore constant on the screen, and the user does not have to wait for so long when changing the SELECT lists.
Regards Michael

Similar Messages

  • Popup Lov referencing page item Problem

    Hi,
    I try to display a list in a popup lov item. This item references an another item in the page :
    select NOM d,EMAIL r from ACTEURS
    where ID_DOSSIER = :P16_ID_DOSSIER_PRINCIPAL
    If i make the id_dossier directly as a number, the popup works and display the list, but if i make the item :P16_ID_DOSSIER_PRINCIPAL it dos'nt work.
    Please help !
    Thanks

    User,
    Changes are there is a process that is resetting the session state for the page that has the item you're trying to reference. One suggestion would be to create a hidden item on the same page that you have the LOV item that referenced the item on the other page. Then make a page process on the "other" page that sets your new item with the value of the other item before session state is reset. Then just modify your query to reference your new item.
    If you put an example up on apex.oracle.com and provided the workspace/username/password (you can create a new user account for this) I'll take a closer look.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Referencing static LOV from plsql

    I have a number of static LOV's. How can I reference these in PL/SQL.
    For example, I am creating a report using PL/SQL so that I can create the exact layout I require. The data uses a number of list of values so I need to convert the value fields into the displays fields from the list of values using PL/SQL.
    How?

    Jezzer,
    It will depend on your version. If you are using 2.2 or 3.0, you could use the view APEX_APPLICATION_LOV_ENTRIES to access your lov values. It will automatically be limited to the workspace that your schema is associated with and then you can further qualify with the APPLICATION_ID and LIST_OF_VALUES_NAME. To see the view, navigate to Utilities > Application Express Views and query on lov.
    -- Sharon

  • Referencing Display_Value in LOV

    Hi All,
    I'm hoping this is an easy question, but I have searched and have yet to come up with a solution. I have created a dynamic LOV to select criteria for a report. I need to use the return value for the sql query, but also want to use the display value in the report itself.
    Is there any way to reference the Display Value of a dynamic LOV in a SQL statement?
    Any help would be greatly appreciated, thanks!
    -Jon

    Hi Paul,
    Thanks for the quick reply. I actually want to use the display value as part of the Report Title. So for example.
    The LOV would have a display value of John, and return value of 1001. I need 1001 for my sql query, and I want to grab the display value "John" to use in the report header something like: June Sales numbers for "John"
    I figured out a workaround to use a decode function to pull the value and push it into a hidden field, I was just hoping there was an easy way to reference the display value of a LOV directly.
    Thanks again,
    -Jon
    Edited by: 863579 on Jun 3, 2011 5:31 PM

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • How to accessing current row report column value in Lov Query?

    Hi,
    which access methods (eg. bind variables, substitutions, ...) for getting the current row report column value can be used in the "Lov Query" property of a report column?
    As what I know of and what I have read on the forum there are no bind variables for the report columns. For the "Link Text" property it seems that the column values exist as substitution strings (#COLUMN_NAME#). But they don't work in the Lov Query. => And would be good because of a hard parse each time the Lov query is executed.
    The following post (Re: Simulating a correlated sub query in lov
    is showing a solution to use package variables for temporary storage of the referenced value, but the only problem with that solution is that if a new record is added with the "Add rows to tabular form" process the package variable still contains the value from the last queried row! Is there a way (variable, APEX package, ...) to determine if the lov query is executed for a new record so that the package can return null?
    I know that I could write the package in a way that the value is immediately cleared when lov_pkg.keyval is called (one time read), but then I would have to create several variables if I'm accessing the value multiple times in the query or in another query => I think an one time read solution would be very obscurely.
    Thanks for your help
    Patrick
    http://inside-apex.blogspot.com

    Hi Patrick,
    I agree that it's a waste to continually use Ajax to go back to the server to get the contents of a dynamic select list.
    There are no bind variables for any row item - but what you do have, as per my previous post, is the value of the data entered by the user in the first row. You can pass this into your application process (using get.add("VARIABLENAME", value)), which can use it to retrieve the correct LOV in your Ajax code - this will give you a "bind variable" that your process can use.
    What you could do, however, is generate hidden select lists on your page - one for each possible LOV list and replace the contents of the new row's select list with the contents of the appropriate hidden select list. This is easy to do with javascript (using innerHTML functions). Obviously, though, the usefulness of this depends on the number and size of the select lists.
    Even if you don't generate them to start with, you can keep a copy of any select lists returned by Ajax in the DOM for use on new rows. So, if you have retrieved a select list, you will have a copy of it in DOM which you can then copy into the new row. If you don't have the list in DOM, use Ajax to get it, store a copy of it and copy it into the new row.
    Which method you use will depend on the number/size of select lists needed. If they are few in number and/or size, I would suggest generating hidden lists. If they are large, use Ajax to get them once, store them and then retrieve them from the DOM when needed.
    There is another thread here where Arie recommends going to the server every time to make sure you get the most up-to-date data for the lists. If you want to follow this advice, for this reason, use get.add("VARIABLENAME", value) to pass the value to your process. If this is not an issue, you can use one of the other methods I outlined above.
    Regards
    Andy

  • Mandatory fields in a LOV

    I have a view in which I've added attributes from an entity to make a LOV. These attributes are mandatory in said entity. Foreign key in the view (and in an underlying entity) is not mandatory however (it can be null).
    When I drop this LOV column onto a page as an InputText with ListOfValues, resulting form field is required (and it will show an error if I leave it empty and try to submit the form). That is not what I expect. The entity referenced from a view is not updatable, the underlying entity is.
    How can I have an optional field with a LOV, not making referenced entity columns non-mandatory?

    Hi,
    Try after remove required attribute in your LOV
    required="#{bindings.YourField.hints.mandatory}"

  • Personalizing LOVs in Create Timecard

    Hello,
    i have to personalize the "Create Timecard" page in "Self Service Time and Expenses" under Apps 11.5.10.
    If I choose the "Personalize page" link, in the personalized I find the following structure:
    Page Layout: Time Entry >
    Stack Layout: Recent Timecards >
    Stack Layout: Timecard Container >
    Table Layout: Required Field
    I have to make my changes at this level, but I can't find the items I must modify. I[b] have to Personalize Project, Task, Type LOVs, but I don't find them in the Personalization Structure!!!) How to Personalize these items ?.
    I've also gone through metalink document 304340.1 but not find anything regarding how to Personalize LOVs functionally.
    Can you help me, please?
    Thanks a lot.

    Time and Labor (OTL) has it's own method of configuring the timecard layout - have a look at the documentation on the OTL layout configuration. You can create as many Timecard layouts as you want, but when we did this it involved using FNDLOAD to dump an existing layout, modifying the ldt file and then loading up the new layout with FNDLOAD. Who gets which Timecard Layout is driven off the OTL Preferences, which would be why you saw different Create Timecard pages for different users.
    We haven't done exactly what you are trying to do, but we have created a custom LOV and to get that called from the Create Timecard screen we need to create a custom Timecard layout that referenced the custom LOV and then update the preference groups to use the new custom Timecard layout.
    Having said that, the content of the LOVs are not driven off the Timecard layouts (but how they are called is) - they are just OAF regions as far as I know. I thought that we had used personalisation on one of the standard LOVs to reorder columns, but that was back on 11.5.9, so I don't know whether the 11.5.10 changes in personalisation have affected that.

  • Using a LOV for the Start of a Tree - Pblms using LOV value for Start SQL

    I'm trying out my first APEX Tree using P20 and am having problems with it. The data structure is I have a clients table, an users table, a plans table and a union table (plan_users) that shows which users for a client are working on plans. An user belongs to a client and can be assigned to plans (plan_users).
    client_id (key to clients table and part of the composite key for users, plans and plan_users) is available as an application item which I can reference as :FOCUS_CLIENT_ID.
    I created several LOV's in the Shared Components. The PLANS_LOV returns all plans defined for the :FOCUS_CLIENT_ID. I've referenced this PLANS_LOV in the P20_ROOT_TREE which is setup to display the list of Plans for the Client as a SELECT LIST WITH SUBMIT. That seems to work and I can select the Plan.
    I then modified the SOURCE for the P20_ROOT_TREE to add a select statement to take the PLANS_ID selected in the LOV and use it in a Select to bring up the owner of the plan as the starting user for the tree. This is where I get an error when executing the SOURCE select statement which looks like this:
    select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link
    from plan_users p, users u
    where p.client_id = :FOCUS_PLAN_ID and p.PLAN_ID = :PLANS_LOV
    and p.user_id = p.plan_owner_id
    and u.client_id = :FOCUS_PLAN_ID and u.user_id = p.user_id
    I'm guessing that the problem is what I'm referencing as :PLANS_LOV in the statement below. However I cannot find any information on how to reference the returned value from the PLANS_LOV for Page 20 so I've tried this.
    If this works right, then I want the user to select a PLAN from the LOV box and then see a tree displayed with all USERS hierarchically displayed beneath the Plan Owner. There may be multiple levels of users display under the Plan Owner.
    Here's the DEBUG page error I get. The number 4 is the correct Plan # I want to select Users for. The title on the page is "Available Plans". - Select Plan - is the default Null Value and Test Plan One is the Plan (#4) that I selected.
    Item: P20_TREE_ROOT COMBOBOX_WITH_SUBMIT
    Available Plans
    -Select Plan -Test Plan One
    [javascript:popupURL('f?p=4000:371:1020131294804981::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1096326828951548,101,20');|Edit]Warning: Tree root ID "4" not found.
    0.05: Computation point: AFTER_BOX_BODY 0.05:
    Processing point: AFTER_BOX_BODY
    The query I'm using for populating the rest of the tree after the START is this statement below, but I don't think I'm getting to this point yet.
    select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link, null a1, null a2
    from plan_users p, users u
    where p.client_id = :FOCUS_CLIENT_ID
    and u.client_id = :focus_client_id
    and u.user_id = p.client_id
    order by name
    I haven't been able to find any examples of someone using a LOV as part of the START definition for a Tree. All of the examples I've seen use a fixed value (i.e. 1).
    Anyone have some ideas?
    Thanks!
    Rob

    Hi,
    Try something like:
    select p.user_id id, p.plan_owner_id pid, u.user_lname name, null link, null a1, null a2
    from plan_users p, users u
    where p.client_id = :FOCUS_CLIENT_ID
    and u.client_id = :focus_client_id
    and u.user_id = p.client_id
    START WITH :FIRST_USER_ID
    CONNECT BY PRIOR p.user_id = p.plan_owner_id
    order by name:FIRST_USER_ID should be computed to be the first p.user_id value that matches the filter. Ideally, the p.plan_owner_id value should be null for this user as this user should identify the top of the tree. As an example, the following, using the EMP table, will allow you to display a tree with any manager as the root:
    SELECT
    EMPNO ID,
    ENAME NAME,
    CASE WHEN EMPNO = :P1_EMPNO THEN NULL ELSE MGR END PID,
    null LINK,
    null a1,
    null a2
    FROM EMP
    START WITH EMPNO = :P1_EMPNO
    CONNECT BY PRIOR EMPNO = MGRAndy

  • Long LOV for a report region attribute

    I have an updateable report based on a SQL Query with a few attributes in it. One of the attributes is an id referencing another table (a foreign key). I would like to display a descriptive name from the referenced table in place of the id and provide a LOV to choose from when updating or creating a record.
    'Select List (named LOV)' or 'Select List (query based LOV)' Tabular Form Element would do it nicely, but the problem is that the LOV is very long (hundreds of records). 'Popup LOV' (either named or query based) is perfect in terms of selection, but it returns the id into the element. So effectively I am looking for an element with functionality of 'Select List', but presentation of 'Popup LOV'.
    Hope the above is query. Any suggestions are appreciated.

    Thank you for a quick answer, Michelle.
    Unfortunately this option is not available in the 'Display As' list in the 'Tabular Form Element' section of the attribute definition screen. Here is the full list of the options:
    <ul>
    <li>Standard Report Column</li>
    <li>Display as Text (displayed as LOV, does not save state)</li>
    <li>Display as Text (saves state)</li>
    <li>Display as Text (escape special characters, does not save state)</li>
    <li>Date Picker</li>
    <li>Text Field</li>
    <li>Text Area</li>
    <li>Select List (static LOV)</li>
    <li>Select List (named LOV)</li>
    <li>Select List (query based LOV)</li>
    <li>Hidden</li>
    <li>Popup LOV (named LOV)</li>
    <li>Popup LOV (query based LOV)
    </li>
    </ul>

  • How to use list_item to trigger LOV

    This is for an assignment building a hotel reservation system
    Basically I have a list_item, with a variety of elements. I want to be able to select the list_item, choose one of the elements and have it launch an LOV. The user chooses from the list_item (r_type) a value such as "Single with Double Bed". As soon as the user selects this I wanted an LOV to pop up with the available room numbers of that type.
    I am using a trigger of WHEN-LIST-CHANGED:
    GO_ITEM('CUSTOMER_BLOCK.R_TYPE_LIST');
    LIST_VALUES;
    When I try this, and run the form, and try changing the drop down list it gives me FRM-41026: Field does not understand operation.
    I've searched google all I can and can't seem to find instructions on linking a list_item to a LOV in this way.
    Help appreciated, thanks.

    Presumably you have an item for the room numbers ? You ought to attach the LOV to that item and the W-L-C should go_item to the room number before launching the LOV. The
    value of the list item can be referenced in the LOV where clause.

  • How to set the LOV value programmatically?

    Hello,
    I have a LOV (select list with submit) the value (displayed and corresponding returned) of which I would like to set by selecting a row in a report.
    What is the event I use to catch the selection of the row in the report and what would be the sample code to set the LOV values?
    Thanks a lot!
    Gabor

    Perhaps a more detailed explanation of the issue helps:
    I am developing an online internet bookmarking application. It basically contains a folder tree and bookmarks within the folders.
    The folder tree is implemented by a table referencing itself (main columns are: ID, NAME, PARENT_ID).
    The LOV lists the NAMEs (actually, the full path of each folder as returned by a function) and returns the IDs.
    When the user selects a NAME, folders and bookmarks contained in that folder are listed in a report (non-recursively).
    The action of the user clicking a folder in the report should simulate the above as if they selected the name manually. This is where I need help!
    I hope this helps. Thanks!
    Gabor

  • LOV in Advanced Search Mode Problem

    Hi all,
    I have a strange problem with LOV!.
    In advanced search of our pages, sometimes we used LOV.
    As a normal way, we used two entities for the whole page, one as updatable
    one, and another which is referenced in LOV and I defined that as reference.
    After choosing a value from LOV, I want to assign its return values (from
    selected row) to other fields. The returned values from LOV that are comming
    from updatable entity is available and I could access them, but I can not see
    the returned values from the reference entity.
    At the end, I repeat that our LOV is working now for create mode and our problem with that is only in Advanced Search mode.
    Thanks for ur helps:)

    Hi Nasser2,
    You could try to make the attribute in the reference entity that you want to put a new value in, updateable.
    I guess you don't see the return value in that attribute in advanced search, because the VO-attr is readonly (which makes sense, because it is a reference-attribute!).
    Regards
    Evert-Jan
    JHeadstart Team

  • LOV not returnig lookup values of 2. level (11.1.1.6)

    Hi
    there are 4 entity objects: A is a child of B while B is a child of C and D, so A contains ID of B, while B contains IDs of C and D.
    I have created a view object based on A (as updateable EO) and B, C and D as referencing EOs.
    I have created a LOV on EO A attribute which need to return data from C and D attributes.
    The problem is that lookup data from EOs C and D are not returned after being chosen.
    Is it a bug in 11.1.1.6 only? Because I tried to replicate usecase using 11.1.2, but it works fine.

    Anybody?

  • Filter report using lov

    Hi Everyone
    I want to filter a report based on the selection of drop down list of LOV select list.
    I have create a report which will show the columns, employee id, employee name, manager, manager id , sal, deptno.
    and created a page item which list values of manager name and manager id is return_value.
    How to pass this parameter to the report to filter it based on the selection.
    Pls help me out how to fix this issue.
    Thanks in advance
    Sandeep

    Sandeep,
    Every page item can be referenced as a bind variable in a report.
    If you created your LOV and named it "P1_MY_LOV". you can reference that in your report as:
    select emp_name
      from emp
    where department = :P1_MY_LOV
    Edit
    Keep in mind select lists have two values. A display value and a return value. The return value is what is actually used by the select list bind variable, not the display.
    Cheers,
    Tyson Jouglet
    Edited by: Tyson Jouglet on Jun 28, 2011 7:58 AM

Maybe you are looking for