Can we have the 'select list with submit' type within a tabular form?

An item can be the "Select list with submit' type so a form has no problem with it. However, when I built a tabular form manually, I couldn't find this type. There are only three types avaiable: "named", "static", and "dynamic".
Is it possible to have the "submit" type so columns of the tabular form can be dynamically rendered based on the user inputs?
Another question I have is how to dynamically build the tabular form with decode func. For example, if the value of col_1 is 'val_1', then build a select list in col_2; otherwise null in col_2.
I tried to use
select col1,
decode (col1, 'val_1', select htmldb_item.select_list_from_lov(2, first, 'lov1') from dual, null)
from....
where....
But it didn't work.
I'd like to know whether it's feasible to have something like that.
TIA.
Message was edited by:
Luc

You could use a region of type PL/SQL function
returning SQL query to dynamically build this kind of
tabular form. However if you want to use the built-in
multi-row insert, update and delete processes, all
items in a column must have the same display type. Marc, thanks for the quick reply. I appreciate it.
I got your idea. However, I need to have the javascript 'ToggleAll' as the heading so the form works as same as the built-in one. If I put the query definition into a pl/sql procedure, where I can put this html tab attribute? It can not be inside the checkbox function, otherwise the checkbox of any row would act as same as the header.
I hope I've made this clear.
To Vikas: It's our clients who want this, not us. :(

Similar Messages

  • Associating a process with a 'select list with submit'

    Hi,
    In a tabular form I have 2 'select list with submit'. If a row is selected in the tabular form I need the following functionality from each of the select lists:
    Once a value is selected from the list a process will get excuted which will update a column of the checked row in the database table with the selected value from the list.
    My question is,
    1. How can I associate an 'after submit process' with the 'select list with submit'?
    2. Can I store the selected value in a variable which I can pass as an input parameter to a PL/SQL body?
    Regards,
    AM

    Hi,
    Please see my requirement below.
    I have a 'select list with submit' say P1_Select in a Tabular form Page. I want to create an after submit process (PL/SQL Process) which will take the selected value from the select list as input parameter and perform an update function for the checked row with that value.
    I'm trying give a feel the procedure:
    CREATE OR REPLACE procedure "P_REJECT"
    (p_message IN VARCHAR2 default Null)
    is
    begin
    FOR ii IN 1 .. APEX_APPLICATION.G_F01.count
    LOOP
    UPDATE NI SET NI.STATUS_NI = 'WCONF', NI.NI_Message = p_MESSAGE
    WHERE NI.NI_REF = APEX_APPLICATION.G_F01(APEX_APPLICATION.G_F01(ii));
    END LOOP;
    end;
    As suggested by Flavio I created the conditional 'after submit' process where I'm making a call to the above procedure.
    1. I am not sure how to pass the selected value as a parameter to the proc.
    2. 'request = value, where the value is the string literal P1_SELECT'.... Could not really figure out the meaning of string literal P1_SELECT
    Regards,
    AM

  • Using a Select list with Submit

    I am trying to use the select list with Submit on my page.
    I have 3 select lists.
    On the first one,I am showing the list of all jacks.
    When the user selects a jack from the first list, I want to show all the jacks except the one which was selected.
    When the user selects a jack from the second list, I want to show all the jacks except the ones selected in the first list and the second list.
    I have created the select lists with submit and then I have put the query for getting the jacks. I created an unconditional branch. I am also passing the variables so that I can set the values of the items on submit.
    I also created a computation as mentioned in one of the OTN discussions, and have mentioned the value of second list to be calculated from the first and 3rd from first and second.
    But after clicking the first select list, I am losing all the existing values on the first page. I wonder what I am missing here. Can anyone hellp?
    Thanks,
    Gargi

    Gargi,
    In this case using 'select list with redirect' makes more sense rather than with SUBMIT. So change all the select lists to 'select list with redirect' (it redirects to same page inserting 'select list' value session state).
    Now for the 2nd select list query add a condition in where clause like
    WHERE sl_col != :P1_SL1And for the 3rd select list query add a condition in where clause like
    WHERE sl_col NOT IN (:P1_SL1, :P1_SL2)Hope it helps :-)
    Cheers,
    Hari

  • 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 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 :-)

  • Javascript / Select List with Submit problems

    I have a page (page 3) where I can either edit or create a record. If I am editing a record, the data loads on page 3 via a PL/SQL block. On page 3, I have a textual item with Javascript linked to it which pops up a new window. In the Javascript, I am passing three values to the next page. Two of those values (P3_ITEM1, P3_ITEM2) are 'Select List with Submit'. If I am creating a new record from page 3, the Javascript works fine and the popup window comes up when I click on the textual item. However, if I am editing an existing record, I get an error when I click on my textual link. Looking at the address bar, it is not passing the value of P3_ITEM1 and P3_ITEM2 to the next page. It does, however, pass the value of P3_ITEM3 (not a 'Select List with Submit') to the next page. Again, the Javascript popup works fine if I use the 'Select List with Submit' fields to populate P3_ITEM1 and P3_ITEM2 (i.e. if I submit those fields) and it does not work if P3_ITEM1 and P3_ITEM2 are already populated when page 3 loads (i.e. if I do not submit those fields). Looking at the session variables, it appears as though P3_ITEM1 and P3_ITEM2 are set prior to clicking the link which initiates the Javascript. However, the URL in the popup window says the value of those fields is 'undefined'. Does anybody have any idea what I can do to make this work or why it is not working? Thanks.
    -Chris

    Hello Chris,
    It seems like you are having some problem with setting/reading session state, but it’s really hard to pin point the problem without seeing any code. Can you post your two pages on apex.oracle.com?
    Regards,
    Arie.

  • Select List with Submit refreshes page to top force users to scroll down

    Hello All,
    I have Dependent Select List where this functionality driving select list submit values to a subsequent select list.
    The "Select List with Submit" refreshes page where the unintended by-product is page refresh, which returns to top of page and therefore force users to scroll back down.
    In other words: I have a long form page where I have a Dependent Select List. So when you change the value of the 1st select list it refreshes the 2nd. This is all fine, but when the refresh occurs, the Form-focus returns to the top of page. This makes the users scroll back down to the lower end of the Form where they left off. This would make usability problems for users.
    Anyway we can make the Form return where to the area(Item or Region) where the user was during the selection of the Select List?
    Thanks in advance,
    Konstantine

    HURRAY!! I got it to work perfectly using anchors. I am adding this message to help future ApEx developers.
    I have been searching the Forum for 3 days and have read numerous postings. There was a lot of good discussion on anchors and linking from page to page. But, nothing exactly like my situation.
    Situation: Have a page, PG4, with a button, PG4_BUTTON, that redirects to a different page, PG7. PG4_BUTTON has its 'Display In Region' field set to PG4_REGION. When PG4 is run and the form displays, the PG4_BUTTON is located at the bottom. When the user would click PG4_BUTTON, the user would be taken to PG7. (this is good) The user enters some data in PG7 fields and then clicks a create button, PG7_BUTTON. PG7_BUTTON would submit data. An After Processing, Go To Page, Branch would be activated when this button was pressed and then the user would be returned to a refreshed PG4, at the top. This forces the user each time to have to scroll down to the bottom of PG4 to continue. (this is NOT good)
    Solution: On PG4, I edited the region, PG4_REGION. For the region 'Title' I added an anchor before the actual name. So it looked like this:
    {a name="REGION_TO_RETURN_TO"></a}PG4_REGION
    please note: where I have the curly braces above '{' '}' you need to put < the pointed and '>'
    Next, on PG7, I edited the Branch. On the 'Edit Branch' page, in the 'Action' region, I changed the 'Target type' field from 'Page in this Application' to 'URL'.
    To the 'URL Target' text area field I added this:
    f?p=&APP_ID.:4:&SESSION.::::::#REGION_TO_RETURN_TO
    So, there you have it. If you still need to read other postings, here are a couple of the sites I read:
    Re: Lists that go to items
    Re: URL target on a button.  What is the syntax??
    How to use <a name="top">Hello I'm at the top </a> tags in apex url ?
    Re: anchor or go to item from a branch
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_navigate_in_a_page-1.6.html
    http://www.echoecho.com/htmllinks.htm
    http://www.htmlcodetutorial.com/linking/linking.html
    http://www.w3schools.com/HTML/html_links.asp
    Thanks,
    Maggie

  • 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

  • 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.

  • Simple select list with submit solution

    hello,
    i read all the topics on select list with submit bottton but couldn't get it to work in my app.
    i have a form on a table( create with a wizard). i have 2 fields that i converted from text field to select list (first with submit and the second depand on the value of the first).when the 1 lov source type is db column then it can't save the value after the submit.
    when i change the first lov to somthing else and set the source used to "only when current . . " i get a null value in the table.
    how can i save the state of the first lov and still get the insert to work ? please guide me step by step .
    here is the first love definition:
    select cat_desc,catid
    from category_main
    order by catid
    the second lov:
    select cat_desc,catid_sub
    from category_sub
    where catid = :p36_mcategory
    the proccess is Automatic Row Processing (DML)
    thanks

    thanks for the answer
    i will try clarify my problem
    i create a form with a form on table wizard
    the desc table is
    bugid pk
    mcategory (main category)
    scategory (sub category)
    the mcategory,scategory need to be cascade lov so i changed what the wizrd created for me (text field) to lov.
    i changed the mcategory to lov with submit.
    i created a branch to the same page for the lov.
    when i run the app and change the mcategory the page submit but does not save the change.
    i also cant change the source used to "only when curren ..." because the source type is "db coulmn"
    thats my problem , i just want to create a cascade lov on this form .
    here is the example
    http://htmldb.oracle.com/pls/otn/f?p=19496

  • Select List with Submit Not pulling % values

    Hello All,
    I have a tabular form in app and displays data based on choice selected in 'select list with submit' from Item, it works fine for values chosen, when i choose '%' I want to display all the records existing in the tabular form but instead it says 'No Data Found'. How do i solve this ? Kindly advice and help.
    ex:
    Tabular form query-
    select a, b
    from table
    where a like :ITEM
    Item:
    Type: select list with submit
    Named LOV:
    select a d, a r
    from lookup_table order by 1
    Appreciate your response.
    Thanks and Regards,
    Senana

    Hello,
    You need to check what value is returned by select list when you select '%' in the select..
    there is a field display null value as where you can enter '%' and return value of null you can enter 0
    and then modify your tabular form query to
    select a , b from table where a like :ITEM OR :ITEM = 0
    Regards,
    Shijesh

  • 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 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".

  • Keeping cursor in same item where Select List with Submit is ued

    Hi,
    I am using Select List with Submit and when I do this and redirect to same page, cursor focus goes to first item in region or page.
    How to keep the cursor in same item?
    Pl Help as I am not very sure to it in Java Script and i am having such items more than 50 per page.

    APEXDeveloper,
    Try this:
    Suppose ur select list with submit is "P1_SELECT" and the item to set focus on is "P1_MAIN".
    In ur page HTML Footer, use something like:
    <script language="javascript">
    if($x('P1_SELECT').value!="")   ---> when a value is selected in the select list (assuming that the select list can also display a null value)
    {$x('P1_MAIN').focus();}
    </script>Hope this at least gets u started.

  • Dynamic list... select list with submit

    Hi,
    I am trying to create a dynamic list and based on the selection I want to pass the parameters… Here is what I’ve done so far
    Step 1… created a list of values (through shared components) using a query
    Step 2… created an item… used option to select list with submit…
    Here is the challenge: How to update my P1_Value based on the value from Select list…
    Thanks in advance

    I've created a page process by following these steps
    Create Page Process:
    Category of the process: Session State
    Session State process type: Set Preference to value of Item (PreferenceName:ITEM)
    Point: On Submit after computation and validation
    Preference Item: P1_Value
    Getting an error message:
    Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

Maybe you are looking for

  • G5 No power, only 1st LED on at test

    hi, I have read many of the posts here relating to Imac g5 not starting up. I have the same problem. I have a g5 ALS. I did the LED test. The first LED comes on but the second LED would not flicker or come on. So, I concluded (from the apple support

  • XML Schemas and "Type"

    I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one: According to Eclipse, I'm not allowed to pu

  • MOVED: P6N Sli Plat. weird cold boot issue

    This topic has been moved to Overclockers & Modding Corner. https://forum-en.msi.com/index.php?topic=116740.0

  • Automatic log-out after 20 minutes working in a layout

    Hello We have an automatic log-out of the layout after 20 minutes of work. The time out is set up at 58 minutes. Does anyone know of a paramater in a 3.0B that would trigger this log-out ? Something separate from the main time-out ? Regards Fabrice

  • Question about creating a new osmf plugin

    Hi All, I'm trying to create a new plugin and I'm using the MastPlugin and CaptioningPlugin samples as guides.  I seem to be having an issue in the ..PluginInfo.as class (we'll call it TestPluginInfo.as).  I've pasted my code into pastie, you can see