Odd behaviour - Select with Submit

Hi,
I have some strange behaviour to report, more as a warning than anything else. Beware of impatient users of your HTML DB application!!
Let me try and describe a strange scenario that has been occuring with our application.
The piece of interest is that we have a form that creates a record in a database table.
The user has to choose a STATUS for this record - either Implemented or Unimplemented.
This is a select list with submit so that context-specific fields can be shown depending on the status value.
e.g. if Implemented they have to enter an Actual Implementation Date
or if Unimplemented they enter a Planned Implementation Date.
Also, if its implemented, the "Implemented By" field is displayed (its a "Display as Text (saves state)" item)
This field is defined to have a default value of &APP_USER.
There is an After Submit Computation to set the field to null if the STATUS != 'IMPLEMENTED'
In the majority of cases this all works fine.
However, please follow this carefuly:
1) The user selects Unimplemented as the STATUS.
2) The user changes their mind and selects "Implemented"...BUT...before the screen can be refreshed they press the SAVE button!!
3) At this point they see an error message as they haven't filled in the Actual Implementation Date which has a validation check. However, the "Implemented By" field is now null! This means the status was still "Unimplemented" when the form was submitted, but is "Implemented" at the point of re-drawing the screen.
4) The user now enters the Actual Implementation date and hits the SAVE button. The record is created, but the value for the "Implemented By" field is null which is incorrect.
This is a warning to make sure you consider that users might try do do something like this. We ended up coding an additional After Submit Computation to explicitly set that field to the user name if the status was Implemented.
Jon.

I will try changing the SELECT with a Popup and do it as mentioned in this document:
http://www.oracle.com/technology/products/database/htmldb/howtos/how_to_create_custom_popups.html
Not sure if we can do this for a Tabular form ?

Similar Messages

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

  • 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

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

  • 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

  • Select list with submit issue when they are referred in report region query

    I have a page with a reporting region. Same region also has 3 different list items and depending on the value selected in each item, the report is refreshed. All the 3 list items are "Select list submit with submit"
    Out of 3 items, 2 (say item2 and item3) are populated through dynamic LOV using the value in item1.
    Additionally, when I select a default "ALL" value in in item1, I ignore values in item2 and item3.
    With this background, I am a following issue:
    1. I select a value other than Default value in item1 which filters the report.
    2. Then I select some value in item2 which further shrinks the reports.
    3. Now if I go back to item1 and select the default "All" value, the report is not refreshed with the new values of item1, item2 and item3. But it still shows the report based on value of item2 that I selected in step2.
    How do I set the value of item2/item3 to null if value of item1 is default which is "All"
    Any word of advise will be a great help!
    Thanks,
    Girish

    Hi,
    Make two computations each with the computation text NULL; or
    Make one process with code like:
    BEGIN
    :P1_ITEM2 := NULL;
    :P1_ITEM3 := NULL;
    END;With the condition "Value of Item in Expression 1 = Expression 2"
    Expression 1: P1_ITEM1
    Expression 2: ALL
    (or whatever the return value of ALL is...remember that this is case sensitive)
    Mike

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

  • Pass select option and parameter with submit

    Hello,
    I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
    After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
    But the thing is that i am having problems when submiting a select option and a parameter together.
    It would be really useful if someone could give some examples of this.
    Example of what i want to do:
    SUBMIT PROGRAM_B
    WITH S_MATNR EQ S_MATNR      ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS    ->pass a single value from a parameter.
    AND RETURN
    Regards,
    Roberto

    Hi,
    Try this for select-options:
    SUBMIT PROGRAM_B
    WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
    WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
    AND RETURN
    Hope it helps.
    Regards,
    Gilberto Li
    Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
    Edited by: Gilberto Li on Feb 2, 2009 10:33 PM

  • 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

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

  • 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

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

Maybe you are looking for

  • GR Qty more than Delivery Qty in Production Order

    Hi there are a amazing Production order that GR Qty more than Delivery Qty of finished goods in this production order. there are some data in this production order as below: Order Qty = 2680 Delivery Qty = 2680 Tolerance = 0 However, to my surprise,

  • FCC field separator

    Hi All, Is there any solution for the field separator parameter if the flat file is having single space(not the TAB) as a field separator. I tried copy paste of that space. But it is taking all the filed values in one element.

  • SQL question, to learn

    Can someone explain to me what this is/does/mean ? CASE WHEN 1=1 THEN 0 ELSE 0 END as column column_alias or CASE WHEN 1=1 THEN 0 ELSE 1 END as column column_alias there are 3 tables that are joining on each other and I select some columns from A, B

  • Siri doesn't appear on some machines

    I have (or have access) to several iPads, and Siri works fine with those. However, on my MacBook Pro and iMac, I get a single "beep" when press the "fn" key twice. How do I get Siri to work again? Thanks!

  • I cant get networck on my phone

    HI. I TURN MY PHONE ON AFTER RUN OUT ON BACTRY ,AND THEM I HAVE NO SIGNAL. CAN SAME 1 PLS HELPME?