Change ITEM value:  VARAD

Hi,
My question is:
When page is populated the project_id is equal to 8, when I change project_id to 5 and click Submit button it updates the record with project_id 8 and not 5.
Is there a way to change this so that it gets the current value....
Thank You for your help and suggestions
Jesh
Edited by: user11095252 on Jul 24, 2009 12:35 PM

Varad,
I tried using the javascript popup found in this script, but still no luck
Re: open popup window and passing parameter to the popup
When I look at the session on the popup page, the value is still not passed and
when i change the value of project_id (in the main page, which is page 1) from 8 to 5 and I click on sessions at the bottom of the screen, it still shows 8
Also have a similar case posted on this Thread: Add Insert & Update
Add Insert & Update
I might need some help with this
Thank You for your time
Jesh

Similar Messages

  • Change item value when a specific item has changed... how can i do that?

    Hi guys, i need to ask something...
    Is it possible to have a process or a computation, that gives value to an item, only when one specific item has changed.
    I have other items on my page too, but this two are related, and i need to give a specific value to the first one, only when the value of the second has changed...
    Help please
    tsveti:)

    Hey Farhan, i guess i need some help on that easy javascript...
    i havent done much thing with it so i have almost none experience with js....
    So in 'HTML Form Element Attributes' for the second item I m trying this :
    onchange="javascript:{document.getElementById('P1_SUBPROJECT').value = '-1';}"
    but when i change the value of this second item, the first one (P1_SUBPROJECT) dont get -1
    what am i doing wrong?

  • Change item value before commit

    Hello,
    I have a form in which I issue an execute_query from a mouse click to retrieve database values from a data block onto a form. The user is then able to change the values of these items on the form and commit them via a button on the form. What I want to do is make sure that some of the values, based on another item in the block, are negative and if not, change them to a negative value. before the changes are commited. I can't seem to find the right trigger to accomplish this-- has anyone have an idea on how to do this?
    Thanks in advance.
    Jeff

    Hi,
    How about putting your code in :
    1. Pre-Update or
    2. When-Database-Record
    [Block Level trigger]
    The trigger text could be something like :
    If (:block.col is > 0 ) Then
    :block.col := :block.col * -1;
    End If;
    -- Shailender Mehta --

  • Developer 10g Capture All CHANGED Item Values

    Still learning this application one module at a time so be kind :)
    What is the most efficient way to capture all the data block item values that have changed on the form at say the pre-update trigger?
    I'm thinking of testing for:
    RECORD_STATUS = 'CHANGED'
    and if true then assign the first item to v_item using:
    v_item := 'block_name' || '.' || get_block_property('block_name',first_item)
    Then loop through each item in the block and test the DATABASE_VALUE against the form value and if they are not equal the assign the DB value to a variable and the form value to a variable and build a string of text to be displayed to the user by using:
    IF GET_ITEM_PROPERTY(v_item,DATABASE_VALUE) <> :BLOCK_NAME.ITEM_NAME THEN
    v_dbvalue := GET_ITEM_PROPERTY(v_item,DATABASE_VALUE);
    v_frmvalue := :BLOCK_NAME.GET_ITEM_PROPERTY(v_item,ITEM_NAME);
    v_string := v_string || 'Old value was ' || v_dbvalue || ' and new value is ' || v_form value;
    Then advance to the next item by resetting the v_item variable to the next item using:
    v_item := 'BLOCK_NAME' || '.' || GET_ITEM_PROPERTY(v_item,NEXTITEM);
    And repeat the process until there are no more items in the block:
    EXIT WHEN 'BLOCK_NAME' || '.' || NULL;
    So what would be the most efficient way to do this?

    The form holds information that is inserted by a technician then the manager of the technician has to approve the info and submit it to the director for final approval.
    So what I do is capture any of the changes that the technician makes and put that sting into an email and send it to the manager so they know that changes were made to the record and they can approve or decline the changes before submitting it on to the director.
    My successful POST-UPDATE trigger at the form level ended up like:
    <<
    p_html := 'Catalog item ' || :ITEMS.MANUFACTURER || ' - ' || :ITEMS.MODEL_DESC || ' ' || :ITEMS.MODEL || ' has been modified and the results are as follows: <br> ';
    v_item := 'ITEMS' || '.' || get_block_property('ITEMS',first_item);
    <<item_loop>>
    loop
    exit when v_item = 'ITEMS' || '.' || null;
    v_dbvalue := GET_ITEM_PROPERTY(v_item,DATABASE_VALUE);
    v_itemname := GET_ITEM_PROPERTY(v_item,ITEM_NAME);
    v_block := 'ITEMS';
    v_name := v_block || '.' || v_itemname;
    v_frmvalue := NAME_IN(v_name);
    IF v_dbvalue <> v_frmvalue THEN
    p_html := p_html || 'OLD VALUE WAS: ' || v_dbvalue || '<br>AND NEW VALUE IS: ' || v_frmvalue || '<br>';
    END IF;
    v_item := 'ITEMS' || '.' || get_item_property(v_item,nextitem );
    >>
    The p_html variable is the string that I send to the email package to send out via our mail service.
    Maybe this will help someone with a similar need.
    Cheers,
    Max

  • Changing Item Values before saving Purchase Requisition in me51n, set_data function

    Hello,
            I have written a user exit, which is called whenever changes are made to a purchase requisition. User Exit is MEREQ001 , function module EXIT_SAPLMEREQ_010 . My requirement here is that the Requisitioner should be 135 for every PR item under certain conditions. Therefore whenever there is any change made to the PR, before saving the PR item, I need to set the Requisitioner to 135, give a status message saying that the Requisitioner is set to 135 and save the Pr with the changed values. Following is the code I have written in EXIT_SAPLMEREQ_010. However, the set_data function called below does not change the PR values. Pls help
    data: lt_item type mmpur_requisition_items,
           wa_item type mmpur_requisition_item,
           wa_itemdet type mereq_item,
           wa_itemref type ref to if_purchase_requisition_item,
           w_message type i.
    constants: c_135 type afnam value '135'.
    call method im_req_header->get_items
         receiving
                 re_items = lt_item.
        loop at lt_item into wa_item.
         wa_itemref = wa_item-item.
         wa_itemdet = wa_itemref->get_data( ).
         if wa_itemdet-afnam ne c_135.
           w_message = 1.
           wa_itemdet-afnam = c_135.
           call method wa_itemref->set_data( wa_itemdet ).
         endif.
       endloop.
      IF w_message = 1.
        MESSAGE 'Requisitioner defaulted to 135 for all items' TYPE 'I'.
      ENDIF.

    Hi Sachin,
               I am able to get a reference to if_purchase_requisition_item in my code (wa_itemref ) and am also able to access each of the line items in the PR in the work area wa_itemdet.
    At this point in the code ( wa_itemdet-afnam = c_135 ) , the work area value is set to '135', However, call method wa_itemref->set_data( wa_itemdet ), does not change the values of the work area wa_itemdet . Pls help

  • Change item value at Sales Invoice form before create a document

    HI,
    I am trying to change value for "TrackNo" item on the sales invoice form just before create a sales invoice,
    I have the following code:
    Dim oForm As SAPbouiCOM.Form
    Dim oItem As SAPbouiCOM.Item
    Dim oEdit As SAPbouiCOM.EditText
    Dim periodo As String
    Dim sf As String
    Try
       oForm = Nothing
       oForm = entorno.Forms.Item(FormUID)
       oItem = oForm.Items.Item("251")
       oEdit = oItem.Specific
       oEdit.String = "Y"
    Catch
    End Try
    It seems to work only If i have selected the logistics folder ( the folder where the "TrackNo" Item is located)
    If I have selected another folder as "contents" or "Accouting" when I create the document it fails.
    Can you help me with this problem?
    Many Thanks

    Buenas Sergio,
    Try forcing a click event on the logistic folder. I don´t think there is another option. You are only able to asign the value if the control is visible(and editable).
    Regards,
    Ibai Peñ

  • Change item value by process in DML Form: best practice?

    Hi,
    i have a working DML Form and would like to build an option for choosing values in a popup window and refreshing the page items after closing the popup window.
    the DML Form has a button which opens the popup window with
    javascript:popUp2('f?p=&APP_ID.:210:&SESSION.', 600, 580)
    the popup window has a javascript function under HTML Header
    <script language="JavaScript">
    function passBack2()
    doSubmit();window.opener.doSubmit();window.close();
    </script>
    and a button which called the javascript function
    javascript:passBack2();
    while the user chooses a new value and closed the popup window an application item holds the selected value.
    the following page rendering of my DML Form use the application item in before header computations to get the new values.
    from the developer toolbar's session link i found the values changed by the computation correctly and signed with 'I' but they will not displayed in the page and will not used in the Automatic Row Processing update.
    how to accomplish this?
    Michael

    Michael,
    while the user chooses a new value and closed the popup window an application item holds the selected value.
    How does that happen, with an after-submit process on page 210?
    the following page rendering of my DML Form use the application item in before header computations to get the new values.
    All your popup page does is submit itself and then submit the calling page. There is no invocation of the before-header computation on the calling page in this sequence. You should use an after-submit computation.
    Scott

  • How to change item value after re-loading the page.

    Hi all,
    I have two pages 1,2. From page 1 I am calling page2 (like LOV) by using callMyPopup and in page2 i am setting some variables and returns/refreshes to page1 refreshes using window.opener.window.location=new_url java script, at same time it pass few parameters to page1. How can I write some pl/sql code to show some message to user on page1. I mean I am returning some numbers so i want change into meaning full text. I tried processes no luck. Please help me.
    Thanks

    Hey James.
    Please share with everyone,
    Which version of Oracle Apex are you using?
    What is the Database version.
    and what is the Browser version and type?

  • Is it possible to know if an item value has changed

    Hi,
    I'm working on a form and need to know if an item value has changed without compare it with database_value of get_item_property. there is a button <save> on the form and i want to know when user click again and again on button save if this item value has changed. thanks for your ideas.

    Tabit7 - Posted: Apr 9, 2011 12:15 AMbut sometimes in query mode, the item is not navigable and its vallue changed and the prev_value did not work, perhaps the w-n-i-i do not fire>
    If you look up the trigger in the Forms Help system it will tell you if the trigger will fire in Query Mode. The WNII trigger will file in Query Mode where as the Pre-Text-Item trigger does not.
    i try an other way and it seems to work, i put a flag in w-v-i when database_value is different from block value and use this flag in button Save, thanks a lot for your idea it put me in the way. Glad you were able to find a way to resolve your issue. ;-)
    HamidHelal - Posted: Apr 10, 2011 9:27 AM can you please give an example of u'r idea ? >
    First, create a variable that is visible to the entire form. Many people would simply use a GLOBAL variable, but I do not like the limitations of GLOBALs and I don't like the fact that they are visible to the entire Forms sessions, not just my form. I prefer to use a Forms program unit (PU) Package Specification so I can explicitly define the variable data type (eliminates the need to cast the GLOBAL to the correct data type) and the variable only occupies the amount of memory needed to support the variable. Also, when I exit my form, the variable is automatically erased.
    /* Sample Forms PU Package Specification */
    PACKAGE Form_vars IS
       g_prev_val   VARCHAR2(50);
    END Form_vars;No that I've created a variable to store the Previous Value of an Item, I can write code to use it. I will use a Form Level When-New-Item-Instance (WNII) trigger to ensure I capture the value exiting value of the item before any changes.
    /* Sample WNII trigger */
    BEGIN
       Form_vars.g_prev_val := Name_in(:system.trigger_item);
    END;This is a very simple example. There are many other ways to implement this method; such as using the Pre-Text and Post-Text-Item triggers as Abdetu suggested.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Q:Determine if a item value has changed

    Hello,
    I am sure I am missing something basic but I just can't figure out how to do accomplish this.
    I have a form with a radio button (Yes or No) which I need to determine in a Page Process if the user has changed the value to Yes or not. The result of this will decide if I am going to send an email or not.
    I am running APEX 4.2.1.
    Anyone?
    Thanks
    Andy

    Okay.
    1) For the Dynamic Action:
    You want the Action to be "Execute PL/SQL Code".
    Under Settings, in the code window just put the single "null;" satement.
    Under Settings, for Page Items To Submit - Pxx_RADIO -- note - no colon here!
    Under Setitngs, for Page Items to Return - Pxx_RADIO_LAST -- not no colon here!
    (And don't put both Items on both line because that just causes a lock up when executed.)
    2) The only down side is that if you display Pxx_RADIO_LAST, it will not show it's value until the Pxx_RADIO is change and the values is return in the Dynamic Action. But as soon as it's returned, it's the old value of Pxx_RADIO. And if Pxx_RADIO is toggled, Pxx_RADIO_LAST remains that initial value that it was when first set. If you want to see Pxx_RADIO_LAST on the screen when the page renders, I suppose tou need a DA to save it to the session state when it's set in the before header process.
    If you want, look here on p. 5.
    Workspace: SIMPLE_DEMOS
    UN: hcarson at woh.rr.com
    PW: SD123456789
    RADIO_DEMO ID:25096
    Dever / Ima9Dever
    Page 3: Radio Group
    Page 4: Checkbox
    Page 5: Hidden Item Demo
    To see that the value is saved, Set Radio Group to "Yes" and then go to p. 4. Go back to p.5 and "Yes" will be still be set but the Text Field -- I changed to Text from Hidden -- will be blank. When you click No, then the "Pxx_RADIO_LAST" value of Y will appear here. (Make sense?)
    Howard

  • Line Item Value change in MIRO Transaction

    I have one  requirement i.e as follows.
    <b>Line Item Value change in MIRO Transaction</b>
    After getting the items in table control of  the miro screen of a particular order.
    I have to clicked on edit own condition of selected item.
    then it will show another screen ( create invoice document item - conditions)which have the all condtions details like
    Fra1 , frb1 , sd%  ,  Penalty % , gross price , frieght charges etc.
    In this screen first time it is showing line item as
    in the miro intial screen i.e. if u click po item
    10 it will show 10 only.
    after  updating fra1  value , i came back to the main screen at that time it is asking that select the any one of three.
    after selecting manual selection its fra1 was changed.
    once again if i go to the same line item by clicking
    the edit own condition(13 column if u select all information in textbox whixh is above tablecontrol right corner) it is showing line item as 1 in screen ( create invoice document item - conditions) which  should be line item as 10. ( here i took line item as 10)
    Please clarify this, why it is showing
    first time as  a original line item and
    after updating it is showing like
    for line item 10 -
    1
                   20 -
    2
                  100 -
    10
                  110 -
    11.

    "...it does not work..." is probably the worst description of a problem you can imagine. As an application developer you should know that. Do you use firebug to see what happens once it "does not work"? Any better hints?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Dynamic Action on Item Value Change with AjaxRequest not working

    Hello,
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a Query to find the email for the new user selected and stick it in text field P222_EMAIL.
    I have an On Demand process on the change of P222_USERS that calls a javascript function:
    fetchEmail($('#P222_USERS').val());
    In my header, the function calls an Application Process in an Ajax request:
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
                             ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
                             ajaxResult = ajaxRequest.get();
    Here is my On Demand PLSQL Process GET_EMAIL:
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    end;
    The email is not getting populated into :P222_EMAIL. I know i'm close, but have already spent a bunch of time with various alternates to the above function/on demand process. Any help is greatly appreciated. I wish the PL/SQL process on the item change worked in this manner instead of going through AJAX.
    Thank you,
    Johnny

    Johnny98 wrote:
    Hello,
    I have a select list of users called P222_USERS. When a new user is selected, I want to run a Query to find the email for the new user selected and stick it in text field P222_EMAIL.
    I have an On Demand process on the change of P222_USERS that calls a javascript function:
    fetchEmail($('#P222_USERS').val());
    In my header, the function calls an Application Process in an Ajax request:
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
                             ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
                             ajaxResult = ajaxRequest.get();
    Here is my On Demand PLSQL Process GET_EMAIL:
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    end;
    The email is not getting populated into :P222_EMAIL. I know i'm close, but have already spent a bunch of time with various alternates to the above function/on demand process. Any help is greatly appreciated. I wish the PL/SQL process on the item change worked in this manner instead of going through AJAX.
    Thank you,
    JohnnyThe fact is that your application process sets the items value in the session state and not populate the value on client/browser side
    So you need to return the value from on demand process and assign the value in javascript like this
    function fetchEmail(email){
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=GET_EMAIL', 0);
    ajaxRequest.add('P222_USERS', $('#P222_USERS').val());
    ajaxResult = ajaxRequest.get();
    //newly added
    alert(ajaxResult);
    $s('P222_EMAIL',ajaxResult);
    //amend your On Demand PLSQL Process GET_EMAIL like this
    begin
    select email into :P222_EMAIL from login where userid = :P222_USERS;
    //newly added
    htp.prn(:P222_EMAIL);
    end;This way the value will be set into session state and client side as well

  • Need help in use of application item - value to be changed dynamically

    HI ,
    i have created a application item and i want to change the value of the application item when user link the URL link
    for eg- I have two link -
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:XXXXX">page 1)
    htp.p('</a></td>');
    (a href="f?p=&APP_ID.:6:&SESSION..:F129_DB_NM:YYYY">page 2);
    htp.p('</a></td>');
    If user click first link then i want the value of application item shuld chnage to XXXXX and it pass the same to page 1.
    and vice versa.There is no if condition in this.
    Please let me know on this.What i need to do in this more.
    Edited by: 946963 on Oct 22, 2012 4:06 AM

    946963 wrote:
    thanks for this .I have links with me its working fine.
    Problem is that it is not chnaging the value of application item .
    When i click on first link then i want to pass value XXXX for applicationitem for page 1 and value YYYY for page 2.This same value i have to pass further to page 3.
    How can i do this Please let me know on this.Have you opened the link that I gave in my prev post??
    //change your code to look like this
    //notice the colons before your application item
    htp.p('<tr><td>AABB<td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:XXXXX">page 1)
    htp.p('</td>');
    (a href="f?p=&APP_ID.:6:&SESSION..::::F129_DB_NM:YYYY">page 2);
    htp.p('</td>');

  • Handling of pictures changed? Item values not properly updated in Beta 3?

    I had created an application which allows to upload an image for a row, basically based on what's done in the demo app for the products table.
    Today, I exported the app and then uninstalled Beta 2 and installed Beta 3. Installation finished without any problems - so far so good, but after I recreated my tables etc. and then imported the application, the image handling just didn't work any more...
    I took a look at the demo app in Beta 3 and saw that unlike before, it looks like the blob content is no longer being inserted into the DEMO_IMAGES table, but instead remains in wwv_flow_files (now called htmldb_application_files?). This feels wrong somehow, IMO the former approach moving the file content into the custom table was much safer and cleaner.
    Also, I noticed when I open an edit page from a report link and look at the session state then, the page item values don't get updated properly (in fact nothing gets updated except for the PK value I clicked on the report page) - this feels totally wrong as well (and I suspect some kind of coincidence here why the picture upload or display doesn't work any more like before)...strange enough, the items on the page show the expected values, but in session state display they are all empty (R).
    Is it intended to leave it this way? Why did it have to be changed at all?
    Somehow frustrated,
    Holger

    Holger,
    You are witnessing a couple things here.
    One - for Production XE, the configuration of the Database Access Descriptor for the embedded PL/SQL Gateway makes use of the request-validation-function. This is a function which validates the procedures being invoked from the URL. Out of the box, only those suitable for running XE are enabled. Otherwise, any publicly executable procedure in the database could be invoked directly from the URL, and for security reasons, this needed to be locked down. Search for "Restricting Access to Oracle Database XE" in the online help and you'll see instructions how to open up this validation function for your custom procedures which are invoked directly from the URL.
    Two - you are correct, the Demonstration Application was modified to use the global upload table instead of the custom upload table in your schema. Given the security decision (mentioned above), it was a choice between not locking down the procedures which could be invoked from the URL, or providing a demonstration application which would work for all customers out of the box. Obviously, we chose the latter. From a security standpoint, I highly recommend you to use your own table as you were before.
    As far as your comments about session state and the report link, nothing has changed in this regard. This is consistent and expected behavior. I confirmed this is consistent with HTML DB 2.0 and XE Beta. Scott discussed this on the OTN Application Express forum in a number of places, including here: Re: Automated Row Fetch, when does the value hit the session state?
    Thank you for your feedback. I do appreciate it.
    Joel

  • Passing Interactive report item values to flash chart.

    Hello,
    I am trying to pass an interactive report item value to a 2D column chart type in the chart query as :IR_EMPNO but the item value comes as null and the chart does not show any data. when I am passing this value to another form item and referencing it in the chart query as :P2_EMPNO, it works fine!! have anyone encountered such problem? Please help.
    Regards.

    Thank you Varad...
    Unfortunately, I am still getting no data found. (and there IS data).
    a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
    b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
    Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
    3) Where Fishery_id = :IR_P2_FID
    Where Fishery_id = &IR_P2_FID
    Thanks again!
    Pamela

Maybe you are looking for