Dynamic LOV in tabular form

Can someone please tell me if there is an easy way to code one
Dynamic LOV in tabular form?
I need the ability to access a column in the row of the table value, to be used in the WHERE clause of the query LOV to another column of the line? Seems
how it should be easy, but do not find an answer.

Thanks for any help.

Carol

Hi Carol,.

You can add the definition of the selection list directly in your SQL using APEX_ITEM statement. SELECT_LIST_FROM_QUERY - see: [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDIDGDA]

If you run your page with your existing on this subject, first selection list, then do a View Source and find the list of selection, you'll see an attribute "name" of something as "f01" or "f02" etc. Take note of the part number of this.

Then update your SQL statement to include the above, and using the number you noticed that the Index value (for example, 4):

SELECT EMPNO,
ENAME,
DEPTNO,
APEX_ITEM.SELECT_LIST_FROM_QUERY(4,MGR,'SELECT ENAME d, EMPNO r FROM EMP WHERE DEPTNO = ' || DEPTNO || ' AND EMPNO <> ' || EMPNO) MGR
FROM EMP

Which would give you a list of selection of employees in the same Department as the current employee (excluding the employee themselves)

Andy

Tags: Database

Similar Questions

  • refer to the dynamic field of tabular form in Condition of Action

    I tried to filter on this topic but didn't come with anything.

    Is there a way to refer to a field in a tabular presentation as a condition of dynamic action?

    For example, I want to make it appear a message (javascript "alert") when the value of a field in a tabular presentation is changed, but only if a certain condition meets another field in the same line.  So let's say the State field is XYZ.  So in the condition section, I PL/SQL Expression - XYZ IS NULL.  Something like that.  How I refer to this field my table form XYZ in the section on the status of a dynamic action?

    Thanks in advance.

    John

    To complete the loop and the color of things right;

    condition under when is

    $v (this.triggeringElement) = "SNSG" //or whatever, it should be

    The real action is then (note that I use the $v instead of the more modern value notation).

    var myid = $(this.triggeringElement);

    var specval = $v (myid); value of the species

    var weightval is myid.closest ('tr').find('.myweight').val ();. the weight value

    Alert (weightval);


    I hope that you should get the installer

    Kofi

  • disable the Popup LOV and its icon in a tabular form

    Hello

    My requirement is

    I want to disable Popup LOV and tabular icon.

    If I select the first value in column selection list 'A' then second column Empname disable window popup lov

    and if I select 'B' and then select empname popup lov.

    Kind regards

    Arianne.

    Hi ujwala1234,

    ujwala1234 wrote:

    I want to disable Popup LOV and tabular icon.

    If I select the first value in column selection list 'A' then second column Empname disable window popup lov

    and if I select 'B' and then select empname popup lov.

    You can do it by using dynamic action.

    Use the javascript code in the next thread to turn lov popup tabular icon.

    Reference: How to disable the popup LOV (query based LOV) in the form

    and related to put on over ReadOnly rank tabular thread

    NOTE: instead of setting custom "row_item_disabled" CSS class use the integrated class APEX "apex_disabled."

    If it is still impossible to solve, re - produce the question on apex.oracle.com and share the credentials from the workspace.

    Kind regards

    Kiran

  • LOV cascading in tabular form

    Hi guys,.

    I have read many articles on the generation of LOV cascading in a tabular presentation, but have not been able to make it work

    I created an example in my apex workspace at:

    http://Apex.Oracle.com/pls/Apex/f?p=4000:1500
    XXAPPS workspace
    Name of guest user
    Password demo
    App no 17551
    Page 2

    In my test scenario, I have a table emp, dept and a desk.

    In my tabular form (based on the emp table), I have a column deptno and a column of office.

    Depending on what the user selects in the column deptno, I want the corresponding list of offices associated with this dept LOV to return to offices LOV.

    The structure of the table is

    EMP
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    OFFICE_ID

    DEPT
    DEPTNO
    DNAME
    LOC

    OFFICE
    OFFICE_ID
    OFFICE_NAME
    DEPTNO

    When the user selects a deptno in the LOV I would like that to control the values that are returned to the office of LOV.

    I used the blog post from Jari:
    http://dbswh.webhop.NET/dbswh/f?p=blog:read:0:article:2003800346210117

    but as you can see there is not enough work that LOV Office does not return anything.

    I'm fairly new new JavaScript and jQuery, so probably something wrong, because some steps are responsible for errors and are confusing me a bit for example step2 is causing the page to return to the white (I have commented the code in the example)

    Any help would be greatly appreciated.


    Thank you

    Edited by: Cashy March 7, 2012 04:05

    Hello

    See your sample now

    I have fix your dynamic action. You got some strange numbers start JavaScript.
    Also, you have used bad selectors for parent and child select list.

    I have also change the application process

    Kind regards
    Jari

  • Select the element on a form as a table with a different dynamic LOV on each line

    I would use a tabular form when one of the columns is a Select based dynamic LOV, and where this is dynamic LOV refers to a column on the values in each row.

    So if the tabular presentation was a list of teams and the column selection LOV was the current head of the team, I would like to than this selection list to be filled only with the members of this team (different for each line). As the list of the members of the team is in a different table (all_players or something) I won't fill the LOV with a query with a where clause clause that only selected records of players from team-membership equal to the id of the current team tabular form. Thus, on each line the content of this list would be different.

    -Justin

    This is explained here:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:176

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Tabular form using dynamic Action set

    I have a tabular presentation created using APEX_ITEM.

    That is to say. APEX_ITEM. SELECT_LIST_FROM_LOV(3,NVL(D.FK_ATTENDANCE_CODE,'%null%')

    I want to use a dynamic Action to set the value based on the value of a hidden page element.
    I created a Page element 'P1358_HOLD_ATTENDANCE_CODE', and I can see he's up to the correct value.

    I tried to create a dynamic Action (run Javascript) to set the form of tab selection list item (f03), but it does not work.

    Here is what I tried:

    var line = $x_UpTill (this.triggeringElement, 'TR');
    var otherElement = $(' input [nom = "f03"]', ligne) [0];
    otherElement.value = $x('P1358_HOLD_ATTENDANCE_CODE').value;

    Any ideas?
    I know, as a backup, I could put the ID = when creating elements in a tabular form so that all the lines are different, but I hope that the JQuery can do it more easily.
    Thank you

    Did change selection that I said fix the prob?

    If this isn't the case, him DA is without a doubt was fired at your event?

  • Dynamic LOV TO 6i tabular

    Hello
    I have in the form of two Items (ID, DESC) and I want to fill LOV for item (ID) all records
    and record_Group & the SQL statements are stored in DB.

    ACTION: request in get after QUERY Trigger for each record in a table - the stored SQL-statements of table then put it in the record_group dynamics and fill the dynamic LOV.



    Please advice,

    Thanks in advance.

    but in a times-news-record-instance, you can change the assigned lov

    If you have any 'column mapping"in your LOV you need to reproduce this for each new LOV. It would be simpiler to use the same LOV and the column mapping and simply change the Group of record used by the LOV for each record. You can use the Set_LOV_Property() built into the trigger once - new - Record - Instance.

    Craig...

  • Setting dynamic in tabular form background color.

    Hello

    I am JP and just starting to learn the APEX.

    I know that, in giving the attributes of the element a value such as

    style = "" background-color: #6495ed; ""

    Can I change the background color.

    But it's just static, I want to change it dynamically based on values in the database.

    In the view that is the Source for this tabular form, I have a field that returns values as above = COLOR style...
    But the APEX will not interpret it.

    (I've created some interfaces in MS Access in the past, and it was a breeze with conditional formatting).

    Who can help out me?

    Hello

    You assign in the hexadecimal code of the hidden input tag color statement.
    F01 is this tag input name attribute value.

    You must check your HTML source of the page and find the input tag that keeps the color and change to that value of name tag JavaScript attribute entry.

    Kind regards
    Jari

  • CheckBox group in dynamic LOV-based form

    I try to add a set of check boxes to a form and have problems to get the data incoming or outgoing check box group. I try to use the check boxes to view the transactions that are affected by a specific notification. The table relation is a number to-many between the REG_NOTIFICATION and MISC_VALUES tables with the table NOTIFICATION_LINK providing the link-to-many. I've defined something (P950_REG_TRX) on the form as a checkbox and connected to my named dynamic LOV. The LOV source is:

    SELECT DISTINCT MISC_VALUES_DESC display_value, MISC_VALUES_CODE return_value
    of MISC_VALUES
    WHERE MISC_VALUES_CODE_TYPE = 'REG_TRX. '
    order by 1

    and he correctly generates the boxes with their labels. So far, so good!

    I've set up a page called GET_REG_TRX rendering process. It is an anonymous PL/SQL block and looks like:

    declare
    as_check_box htmldb_application_global.vc_arr2;
    I integer: = 1;
    Start
    for r in (select MISC_VALUES_SEQ_ID
    of NOTIFICATION_LINK
    where NOTIFICATION_SEQ_ID =: P950_NOTIFICATION_SEQ_ID) loop
    as_check_box (i): = r.MISC_VALUES_SEQ_ID;
    i := i 1;+
    end loop;
    +: P950_REG_TRX: = htmldb_util.table_to_string (as_check_box, ' :');) +
    end;

    When I run the application, the form fills correctly except for the boxes. They remain empty. I checked the State of Session data and P950_REG_TRX contains a set of colon delimited numbers that correspond to the data in the MISC_VALUES table. So why not showing that the checked checkboxes? _

    I also added a page that deals with the process for updating the database when the boxes were changed. It is also not update the NOTIFICATION_LINK table. Here's the source for the process:

    declare
    as_check_box htmldb_application_global.vc_arr2;
    Start
    delete from NOTIFICATION_LINK where NOTIFICATION_SEQ_ID =: P950_NOTIFICATION_SEQ_ID;
    as_check_box: = htmldb_util.string_to_table (: P950_CHECKBOX, ' :');)
    because me in 1.as_check_box.count
    loop
    insert into NOTIFICATION_LINK (NOTIFICATION_SEQ_ID, MISC_VALUES_SEQ_ID)
    values (: P950_NOTIFICATION_SEQ_ID, as_check_box (i));
    end loop;
    end;

    The part of the removal of this process works, but not the part of the update.  So, what's the problem here?

    I'd appreciate any help I can get on it.

    BTW - I followed the instructions clearly written in Simple HTML-DB Oracle Application Express of the Rampant to this day.

    Hello:

    What is the point of process for the page process that fills the box run? Make sure it is before that regions are rendered.
    In the post send process page reference you a page named 'P950_CHECKBOX', element while in the rendering of page-process page, you reference the item "P950_REG_TRX". Which of them is the checkbox element?

    CITY

  • How to enter a new value not contained in a dynamic LOV?

    Hello

    I have a tabular layout with a report. This report is used to update a table. I defined a column of the report as a list of selection (called LOVE). It diaplays a dynamic LOVE to let the user choose a value in the LOVE, as a suggestion, but I want to make it possible to the user enters a value that is not in dynamic LOVE. I tried with "Display additional value" in the section "List of values", but this option displays an 'empty' value, but does not offer the possibility to enter a new value.

    You have an idea?

    Thank you very much for your help!

    Christian

    Hi Christian,

    Sorry - my suggestion was for the normal items.

    -J' tried it myself with a tabular form and it market in my env with Popup LOV (named LOV). I have a LOV named for it and then enter
    additional values directly in the text field.

    Best regards

    Carsten-

  • How to create a dynamic lov inside the table?

    Hi all

    I use JDeveloper11.1.1.1.4.

    My scenario is that I have page with editable < af:table >. Table contains a < af:inputListOfValues > inside the column. I want to do this < af:inputListOfValues >

    as a dynamic. Because according to users, we have to get the chronogram different objects in different point of view. I tried with below link it works very well for forms.

    But editable tables, I'm not able to create the dynamic lov.

    ADF practice: dynamic linking LOV

    Thank you

    David.

    Hello David

    have you tried ADFbc lov switcher?

    See - Andrejus Baranovskis Blog: Groovy - multiple LOV by attribute in JDeveloper 11 g

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/89-adfbc-lov-switcher-454168.PDF

    Thank you

  • APEX_ITEM can. SELECT_LIST_FROM_QUERY be used in tabular form?

    Hello

    Is it possible to add an apex_item to an existing query in tabular form, such as the one below?

    SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY (3, job, 'Employment SELECT DISTINCT FROM emp') job

    WCP

    It is an example that can be found at APEX_ITEM.

    My actual query is as follows:

    Select

    "ROWID",.

    "REF."

    "DESCR",.

    APEX_ITEM. SELECT_LIST_FROM_QUERY (10, code, 'SELECT code FROM lov') 'CODE '.

    of ' #OWNER # '. " LOVREF ".

    The report definition, I put the element 'Code' as 'List of selection (query based LOV)' and I get the following error when I run the report:

    report error: ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH

    REF

    Descr

    Code

    Can someone please say if the use of APEX_ITEM. SELECT_LIST_FROM_QUERY is valid in tabular form?

    Thanks in advance

    Yes, but your column definition must use "column of report Standard", if you want to use apex_item.

  • Add button of tabular form a line can open several rows?

    Hello

    I use apex 4.2

    I create tree on page when when I click on any node tabular presentation open and display reports record.

    Now, I want, in my article a tabular presentation contain a selection list

    My requirement is when I click on any node tabular form open the no. lines on the no equals. entries in the respective selection of each tree node list.

    Is it possible?

    Help appretiate.

    Thank you

    GO

    Go

    I've created a demo by adding several lines slot table using dynamic action form.

    Select the number of rows in the selection list and click the button "Add line".

    See the information on the page for what I've done.

    Nicolette

  • Disable the image of calendar in tabular form in version APEX4.0

    Hi all

    I used the JQuery code following in dynamic Action to disable the Hiredate column in tabular form in APEX4.0.

    $('INPUT[name="f01"]').each (function (i)
    {
    var rowSelected = $(this).attr("id").substr (4);
    var hire_date_id = $('#f05_'+rowSelected).attr ("id"); F05-> column of hiring Date which is the date picker
    $x (hire_date_id) .readOnly = "readonly";
    $x (hire_date_id).style.background = "#F2F2F5";
    $($("td [headers ="HIREDATE"] img')) .addClass ('apex_disabled');
    }
    );

    HireDate column is disabled the calendar Image is not disabled in APEX4.0 but it did not work in version APEX4.2.

    Can someone tell me the reason and the solution for this problem?

    Thanks in advance.

    Kind regards
    Lacombe

    Published by: 1004558 on May 7, 2013 07:39

    Thank you very much, Dene,.

    Your code has been useful for me. But I created the picker using JQuery in DA as below,

    $('input[name="f05"]').datepicker({
    dateFormat: 'dd-M-yy',
    changeMonth:true,
    changeYear:true,
    showButtonPanel:false,
    buttonImageOnly:true,
    showOn:'both',
    buttonImage:"#IMAGE_PREFIX#asfdcldr.gif"
    }).parent("td").addClass("datepicker");
    

    and use the following query to disable,

    $('input[name="f01"]').each( function(i) {
    var rowSelected = $(this).attr("id").substr(4);
    $('#f05_'+ rowSelected).datepicker( "disable" );
    }
    });
    

    After that I enabled it in another DA before submitting the page.

    It works Fine... :))

    Thank you
    Lacombe

  • Capitalization in tabular form

    I work in APEX 4.0.

    I want to be able to define a column of tabular forms in capital letters. I can do this with javascript for the elements of the page, but I can't do the same for tabular columns forms. Please, if you know a way to do this, I would appreciate your help.

    Doug wrote:
    I work in APEX 4.0.

    I want to be able to define a column of tabular forms in capital letters. I can do this with javascript for the elements of the page, but I can't do the same for tabular columns forms. Please, if you know a way to do this, I would appreciate your help.

    This can be done easily by a dynamic action and a built-in JavaScript API.

    Create a dynamic action as follows:

    Event: Unlock key
    Selection type: JQuery selector
    Replace your internal column name attribute or name of f03 = "fxx", you can get this by inspecting one of your field column in chrome/firefox
    Jquery selector: input [name = "f03"]

    Add real Action as follows
    Action: Run the JavaScript Code
    It is generic and not need to change
    Code: $v_Upper (this.triggeringElement);

    Change the dynamic action now and define the scope of the event on +(this change is required so that this dynamic action will work for newly added rows) + live

    It is now, as soon as you type something in this column and release the button, the text will be converted to upper case

    Thank you
    Vikram

    Published by: VC on April 20, 2013 18:35

Maybe you are looking for