Ajax select list with an updateable report

Hi,
I have an updateable report where the first 3 columns are all select lists and where the values in each of the select lists are dependent on the value selected in the previous select list.
I've been able to implement this for the first 2 columns using ajax ie. the values in the select list for the second column are based on what value has been selected in the first column, but I have not been able to apply the same logic to the list of values for the 3rd column, which should be based on what has been selected in the second column.
Also, when the value of the first column is changed, it should be blanking out the values of the 3rd column, until the new second column value has been selected, based on the change to the value of the first column.
Any assistance/advice would be much appreciated.
Many Thanks,
Marquita

How did you do that for the fisrt 2 columns, I could only do it in a form not in a report, appreciate your help

Similar Messages

  • Item(select list) with LOV and Report with link = changed value item

    Hello,
    On one page I have:
    - Item 'P_name' (select list) with LOV to select name of a person;
    - Items 'factory' and Report 'factory'(standard created with 'Form with Report' on the same page).
    Situation:
    All works fine. I selected first a LOV Item 'P_name' (say 'Jane'). But....
    Only when I select a record (to change the values) from the report 'factory' then LOV Item 'P_name' become empty. Report used a link to the same page to fill the report items 'factory' and make also the LOV item empty.
    Question:
    I have made a process that write the name 'Jane' to table.
    I see two possibilities:
    - LOV Item value => fill the LOV item with 'Jane' from the table before region. Is this possible?
    - Report => What is the buttonname of reportlink? I can use this name in the processes.
    Thanks Walter!

    1) what i meant was for you to test this ridiculously huge LOV outside of htmldb, but it occurred to me last night that you could, in fact, be hitting a limit of ours. after some poking around, i have confirmed that. select list items in htmldb are currently limited to 10,000 rows. this was initially done for performance reasons, but they're now opening up the restriction. if you really need to work with that many rows where the user is allowed to pick from a set of values, consider using a popup item type instead. it'd help your app performance as well (in my test cases, it stank to have to wait for my 10k select list rows to come down to my browser).
    2) sorry to not have been more clear about this, but when you set your item's "Source Type" back to "Database Column", you'd have to specify that column in the "Source or value expression" field. also, you can't put a sql query into that "Post Calculation Computation" field. as i said before, "you can take a look at the attribute-level help for that field to see implementation examples."
    3) stick with "Always..." for now if you're using our auto-dml process(es)
    regards,
    raj

  • AJAX Select Lists on Updateable Reports

    All,
    I have followed the examples from Karl and Sergio's blog on how to use AJAX to contol dependent LOV lists in a form. My question is, can this be done in an updateable report? I'm having difficulty in determining how to reference the column names of the dependant lists.
    What I basically have is a time app. User selects his project from a picklist and then his associated tasks for that project will appear in the task list. I have used the updatable report option to build this rather then a form, because I liked the prebuilt add row and processing functionality.
    Anyway if anyone knows how to use AJAX dependant select lists in an updateable report it would be greatly appreciated.
    Thanks
    Rob

    See http://forums.oracle.com/forums/thread.jspa?messageID=1222153&#1222153

  • Select list with pagination  in  Interfactive report

    Hi all
    Iam using apex 3.2.1.
    iam using interactive report it contains 15 thousand records.By default only two options are there in interative report x to y and x to y of z pagination. it is very difficult to finding the particular range rows.
    In Sql report select list with pagination and search engine (set based pagination) are provided.
    i want to use those options in in my interactive report
    i f any one knows about the solution please provide me information.
    Thanks in advance
    balu

    hi jari,
    In the HTML header i added this code
    <script type="text/javascript" src="#APP_IMAGES#jquery-1.4.4.min.js"></script>
    <script type="text/javascript">
    function htmldbIrtPagination(pRet){
    var p=$.trim($('#apexir_DATA_PANEL').find('td.pagination').find('span.fielddata').text());
    var a=new Array();var n=new Array();a=p.split(' ');
    $.each(a,function(i,v){if(!isNaN(v)){n.push(v)}});
    n.push($v('apexir_NUM_ROWS')*1);
    switch(pRet){case 'first':return n[0];case 'last':return n[1];case 'max':return n[2];case 'show':return n[3];default:return n}
    function RetMinRow(){
    var lS=$v('apexir_NUM_ROWS')*1;
    var lM=htmldbIrtPagination('max')*1;
    var lN=lM*1/lS*1;
    lN=Math.floor(lN*1);
    if(lN*1>1){lN=lN*1*lS*1+1;if(lN*1>lM*1){lN=lN*1-lS*1}}else{lN=lM*1}
    return lN
    </script>and in region footer
    <div id="first_last"><table><tr><td style="cursor:pointer;cursor:hand">
    <img align="absmiddle" alt="&lt;&lt;" title="&lt;&lt;" src="#IMAGE_PREFIX#srmvall.gif" onclick="gReport.navigate.paginate('pgR_min_row=1max_rows='+$v('apexir_NUM_ROWS')+'rows_fetched='+$v('apexir_NUM_ROWS'))" />
    </td><td style="cursor:pointer;cursor:hand">
    <img align="absmiddle" alt="&gt;&gt;" title="&gt;&gt;" src="#IMAGE_PREFIX#smvall.gif" onclick="gReport.navigate.paginate('pgR_min_row='+RetMinRow()+'max_rows='+$v('apexir_NUM_ROWS')+'rows_fetched='+$v('apexir_NUM_ROWS'))" />
    </td></tr></table></div>Could give the suggestion why it is giving like that.
    Thanks
    Balu
    Edited by: Balu K on Nov 26, 2010 12:58 AM
    Edited by: Balu K on Nov 26, 2010 1:03 AM
    Edited by: Balu K on Nov 26, 2010 1:04 AM

  • How to set "Display as Text" field with AJAX select list

    thanks Denes for your posting. I'm trying to use the Denes Kubicek code to populate a "Display as Text" field. It works for Text Field (disabled), but not "Display as Text" field(saves state) . In my applciation I need to show this field only (not the disabled text box) when a select list value is changed. any ideas to modify the code below are appreciated.
    http://htmldb.oracle.com/pls/otn/f?p=31517:80:3418128396960418::NO
    here is the code from the url above
    1. Create an Application Process - getDet:
    DECLARE
    my_det VARCHAR2 (200);
    BEGIN
    SELECT ename || CHR(10) || job || CHR(10) || mgr
    INTO my_det
    FROM emp
    WHERE empno = :P80_EMPLOYEES;
    HTP.prn (my_det);
    END;
    2. Put the following in the Region Header of your page:
    <script language="JavaScript" type="text/javascript">
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P80_EMPLOYEES',html_GetElement('P80_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P80_DETAILS').value = gReturn  }
    else
    {  html_GetElement('P80_DETAILS').value = 'null'  }
    get = null;
    </script>
    3. Put the following in the HTML Form Element Attributes of :P80_EMPLOYEES:
    onChange="f_getDet()";

    Arie,
    this works fine on normal page, except page zero. I have the AJAX select list and "Display as Text" field on page zero. The "Display as Text" field doesn't show the the value when AJAX select is changed. I'm using similar code as used in my other APEX page on OTN site. I tired to display the gReturn value, just before calling "setDisplayOnlyNode" function in the code below and it's showing correct value, but fails to display the value in the APEX field on page zero. Any ideas are appreciated.
    Thanks,
    Surya
    <script language="JavaScript" type="text/javascript">
    function setDisplayOnlyNode(pItem, pValue)
    { var textNode = pItem + '_DISPLAY'; $x(textNode).innerText = pValue; }
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P1_EMPLOYEES',html_GetElement('P1_EMPLOYEES').value)
    gReturn = get.get();
    if(gReturn)
    { setDisplayOnlyNode('P1_DETAILS',gReturn)}
    {  html_GetElement('P1_TEST').value = gReturn  }
    get = null;
    </script>

  • Select list with submit using on a dynamic report

    Hi! I'd like to know how can I create a Select list with Submit using the HTMLDB_ITEM API.
    I know there's an API named HTMLDB_ITEM.SELECT_LIST_FROM_LOV(), but I'd like to know how can I reproduce in there the submit everytime the user changes a value.
    Thanks!

    Hi! I've discovered there's a parameter on this function that allows me to include a javascript like the example below:
    select HTMLDB_ITEM.SELECT_LIST_FROM_LOV(3, ctr_id,'LOV_COUNTRIES','onChange=javascript:doSubmit()','NO)
    from XXXX;
    The thing is I don't know how exactly this javascript:doSubmit() works, because it works different than creating a select list with submit item.
    If I create on a page a simple "select list with submit" item, and if I run the page, after changing the value of the select list it refreshes the page but it doesn't erase the values inserted on the other items. But if I have this HTMLDB_ITEM.SELECT_LIST_FROM_LOV function, after changing the value of the select list it refreshes the page but it erase the values inserted on the other items and recovers the old values..
    I really need your help on this.
    Thanks in advance :-)

  • How to access the value of fiedl ( select list with redirect )

    WE created one report and form. When i click in the edit button of the report
    for the specific record ; the system go automatically in the form
    and show me all the information. In my form ia have some fields ( select list with redirect ) in this way i store the key but i can see the description.
    I want to control the delete operation in checking the value of some field
    in my form. How can i do that. When i verfy the content with SESSION
    my variable are empty
    Thanks
    Marc Fortin

    Hello Larry,
    You can use a select list with submit and create a branch to the page you want to go to.
    Hope that helps.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Select List with Submit - Branch Error - form data does not save

    I am a new APEX user so please excuse my ignorance. I have created a simple application in which a primary data entry form branches either to a detail form (one to many on the parent ID) or a master tabular report used for navigation. These branches work fine. Then I tried to get a little fancy with a conditionally displayed element based on the value the user selects in a select list on the main form(P9_REPORT_TYPE). I converted the select list to a select list with submit and created a new branch (on submit - after processing) to the current page (Page 9) to avoid the "no branch found" error. To avoid the branch being unconditional, I tried to use the 'Request = Expression1' condition with the Expression 1 field set to P9_REPORT_TYPE. The behavior I get is that the page seems to submit but the data on the form is not saved -- even the new value selected in P9_REPORT_TYPE reverts to the old value. I simply need the page data to submit so that the conditionally displayed element will take effect (which it does if you use one of the other button-based branches and then return to the form). Do I have the syntax wrong? It seems like this should be straightforward but I've tried a number of options including using a PL/SQL condition V('REQUEST')='P9_REPORT_TYPE' with no success. I'm guessing that the value of Request is getting cleared before it has a chance to trigger the branch? Any help would be greatly appreciated.

    Exactly so! Thanks Scott for setting me straight. For the benefit of other readers, the value in the Source Used column had been set to "Always, replacing any existing value in session state" and should have been set to "Only when current value in session state is null".

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

  • Return Value of a Select List with Submit

    I have a Select List with Submit (P8_COLOR) which I want to use to filter the data in my report.
    P8_COLOR has 3 static values ALL, RGB, BYP that return ALL,RGB and BYP.
    When the page is submitted, my SQL Query (PL SQL function body returning SQL Query) does not recognize the return value. I can assign the return value to a different textfield and can see the correct value being assigned.
    My PL SQL looks like below...
    IF :P8_COLOR = 'RGB' THEN
    q := q || ' AND COLOR_ID in (1,2,3)
    END IF;
    I am not a PL SQL expert and wonder whether the IF condition is correct. Would appreciate any help with this.
    Thanks,
    Ghazi

    Thanks Jes. That worked.
    Would you know why :P8_COLOR didn't work? What is the difference between using :P8_COLOR and v('P8_COLOR')? I am using :P8_XXXX for another Select List that only checks for null and that works. The one where I am checking for the return value doesn't work.
    Thanks again.
    -Ghazi

  • Select List with the current value

    Hi,
    I have a Page suppose Page1 with 2 region.
    Region1 is having SEARCH button (target page 1 itself) and a SELECT LIST called Deptno (10,20,30,40)
    Region2 is just a simple employee report based on Deptno (where deptno = :p1_deptno)
    Now when I suppose select deptno 30 and press SEARCH button, report is not displayed and also Dept select list current value becomes the first one in the list i.e 10.
    My question is after submitting the same page 1 using SEARCH button, how can I display the selected value (dept 30) in the select list.
    Note:- If I am using Select List with Submit then it's working fine and also displaying the current value (30) in the list, But I am looking for using SEARCH button.
    Thanks,
    Deepak
    Edited by: Deepak_J on Aug 6, 2009 2:14 PM

    Hi,
    Then the value that is selected in the list will not be submitted, so it will not be saved. You need a button that submits the page.
    Andy

  • Select List with Redirect clears Foreign Key

    I have two pages created by the Form wizard, a report and a form, with a Create button on the report page. When the Create button is pressed it passes a Foreign Key item using f?p syntax - stardard code, so far, so good, the form page works fine.
    However, the form contains three Select List items, and the second and third ones need to be restricted by the value of the first one. That is, once they choose an Organization using the first Select List the second Select List should only show Groups that belong to that Organization. To do this, I have chosen the first Select List to be "Select List with Redirect". This does exactly what I want, restricting the values in the second and third items because the LOVs they are based on refer to the value of the first item in their where clauses.
    This works fine when I edit an existing record, and also works if I create a new record but don't touch the value of the first Select List. The problem is that when there is no database record and the first Select List is changed, it wipes out the Foreign Key value that was passed - so the record cannot be saved. The url after redirection shows only a value for the item that was changed, and does not include the value of the Foreign Key item as it did when the Create button was pressed.
    I cannot find anywhere to specify item/value pairs for the redirection url. So I have created a Computation which sets the value of the Foreign Key item and computes it Before Header, After Header or Before Region, etc. It sets the value, and Session State displays the value. Debug shows it being set, too. But the displayed field is empty in the region, and the record cannot be saved because the item has no value!
    Can anyone tell me what I'm missing here? I suspect the processing of the region is overriding the computation. But I can't find a way around this. Any ideas?

    Scott,
    Sorry, my mistake - it's not a database column, and Alternate Source Used is set to "Only...". The problem is still occurring.
    The tables are:
    - Person - list of People
    - Organization - list of Organizations
    - Organization Role - Roles defined for each Organization, has foreign key to Organization
    - Person Role - Assignment of a Person to an Organization Role, has foreign key to Organization Role and also to Person
    I generated a report on Person with a link to a form on the table. When they press the edit icon, the form for the person comes up fine. Then I enable a series of tabs for that person - to edit addresses, phone numbers, etc. and carry the Person ID forward to each page.
    On the Person Roles page, I generated a report that lists the roles that person is assigned to and a form to maintain the assignments. Pressing the edit button goes to the form to maintain the assignment, which works fine.
    There is also a Create button to add a new assignment, which goes to the same form and clears the primary key of this table to create a new record. I also pass the Person ID in the url so that the new record can create the foreign key value to Person.
    Now here's the problem. On the form to create or edit an assignment, there is a Select List to choose the Organization Role record that they are being assigned to. But this can be a long list, with the same role in several organizations, etc. So I want to allow them to first select the Organization, then select Roles in that Organization.
    To do that, I created a new item on the page that is not a database column. It is defined as a Select List on Organization, and they can choose the Organization from the list. Then the select statement for the Organization Role LOV has a where clause that compares Organization ID against the value chosen by the user. To make this work, the page has to be updated when they choose a different Organization, so I made the Organization field a Select List with Redirect.
    When I edit existing role assignments this works fine. As soon as I select a new Organization, the Organization Role Select List is updated and I can choose roles defined for that Organization. But when I create a new record (which passes in the Person ID in the url) and then choose an Organization, the Person ID is wiped out - and the record cannot be saved without this foreign key value.
    After selecting an organization on a new record, the url shows that the page has been called with only the new value of Organization - so the Person ID is lost, because there is no database record to fetch and it is not passed to the page. And I cannot find a way to set the item/value pairs passed to the url when the redirect is performed.
    I am displaying the Person ID for debugging purposes, and see it disappear if I set Display As to "Text", "Display as Text", "Display as Text (based on LOV, does not save state)" or "Display as Text (based on LOV, saves state)". Interestingly, even though the later saves state (I can see it in Session State), it still gets wiped out in the record - presumably because it's a database column and there is no record, and the value is "Always" going to update the session state.
    Another interesting behavior: If I set the Person ID to display as a Select List, it remains. I think this is because I do not allow extra values or nulls, so it displays the first value in the list if there is no value. (I have only created one person so far in my testing, so I can't tell yet for sure if it changes. Will try that.)
    Is this clear? I'm trying to get this application created in my workspace on htmldb.oracle.com (currently it's on my local database) but having problems creating the tables - unable to create initial extents. Hopefully, I'll have it up there soon and you can examine what I'm doing. I'll let you know when it's available.
    Thanks for your help.
    Sam

  • How to fix "Select List with Submit" Problem

    I have a report with two regions. Region1 has a list item which is set to "Select List with Submit". Based on the list/item value selected in the Region1, the data is displayed in the Region 2.
    Question: How do I ge the report, Region2, to have the data populated based on the first value in the list when the page is loaded - for the first time. Currently, when the page is accessed, the list has the first value selected in the Region1 list item by default, but the Region2 is blank.
    DP
    Edited by: user4115675 on Jan 14, 2010 9:37 AM

    Earl, please see the response in italics for each of your questions below:
    You do want your default value to be one of the values in the select list. Otherwise why would you want the value there at all?
    So, then should I have a default value at all? And, if yes, then what should it be?
    And can't you just set the default value to the first value in your select list, whatever that is, so the first value is the selected value?
    I did that and it works, only if the first value in the select list is always going to be there.  The select list is based on a column data in a table.  And if the data for that column changes then the values in the select list will change.  And, the first value might not always be the same.
    I guess I'm not clear why this isn't doing what you want, besides the fact that
    you seemed to have removed the default value from the dynamic select list query, which you shouldn't do.
    I removed the first value (it could have been any values) from the select list to mimic the "dynamic" select list -- just to test.  The select list data is based on a table and the data in the table can change.
    Thanks
    DP

  • Select list with bind variable does not work

    Hi,
    What can be wrong with a 'select list' with the a simple select
    select omschrijving o, id i
    from basiscodes b
    where domein = 'OPTIES'
    and b.id in
    (select eo.basiscode_id from evenementen_opties eo
    where eo.event_id = :P16_ID)
    The :P16_ID has a value and should give result
    But it does not work at all with 'select list'
    Using the POPUP LOV (display discription, return key value) works nice
    The select retuns less then 10 records

    Hi Flavio,
    As I explained, the P16_ID is an item of the master page (page 16)
    In Page 18 where I want to reuse that value, the item is not there, but I use it to assign
    P18_EVENT_ID with the value in P16_ID and that works fine.
    In an after submit process, I do this :
    declare
    function get_pk return varchar2
    is
    begin
    for c1 in (select EVENEMENT_INSCHRIJVING_SEQ.nextval next_val
    from dual)
    loop
    return c1.next_val;
    end loop;
    end;
    begin
    :P18_ID := get_pk;
    :P18_EVENT_ID := :P16_ID;
    :P18_CREATIE_DT := TO_CHAR(SYSDATE,'DD-MM-YYYY HH24:MI:SS');
    :P18_CREATIE_USER := APEX_APPLICATION.G_USER;
    end;
    The value P16_ID is there before I open page 18
    I made a display item that displays the value P16_ID
    If I change the LOV select in :
    select b.omschrijving o, b.id i
    from basiscodes b
    , evenementen_opties eo
    where b.domein = 'OPTIES'
    and b.id = eo.basiscode_id
    and eo.event_id = 16
    then it returns the value I want : 1 record
    You see, I'm a really new one in apex.
    Forms 6i was easier for me...
    Regards Jules
    null

  • SELECT LIST WITH SUBMIT NOT POPULATING

    I have 3 fields; They are ID, Shortname(PRIMARY KEY), Longname. Longname is a select list with submit based on an lov (called system_longname description) that has a return value of ID. I need to select a value (longname) from that list that will populate automatically the ID and Shortname fields. This is the code I'm using for ID and Shortname, which are both text boxes. The view VSYSTEMS is where the lov is getting it's values.
    'SELECT ID FROM VSYSTEMS WHERE ID = :SYSTEM_LONGNAME DESCRIPTION';
    'SELECT SHORTNAME FROM VSYSTEMS WHERE ID = :SYSTEM_LONGNAME DESCRIPTION';
    Can anyone help me? I keep getting these error messages: invalid SQL statement or SQL command not properly ended.

    Matthew,
    Is this a follow-up to Automatic field population by selecting a LOV ?
    What is the purpose of 'DESCRIPTION' at the end of each query?
    Scott

Maybe you are looking for