How to know whether any item value got changed

How to know in Apex whether any form item got changed. That will help me to know when the user will be pressing the "Apply Changes" button and I will popuplate the "User Modifed" and "Date Modifed" column values in the table. For now, I dont want to write database triggers, but to implement it at application level.

Hi Deb
For a really good explanation of the naming /numbering of tabular form items see Patrick Wolf's blog on the matter.
http://www.inside-oracle-apex.com/which-tabular-form-column-is-mapped-to-which-apex_applicationg_fxx-array/
He also gives a simple example of using check-boxes in tabular forms here
http://www.inside-oracle-apex.com/checkboxes-in-tabular-forms-the-easy-way/
You will notice in his example, that the apex_application.g_f40 is specifically named as 40 - a high number assuming that you don't have more than 39 editable columns in you tabular form - shown in the name="f40" code.
<input type="checkbox" #ADMIN_USER_CHECKBOX# value="#ROWNUM#" name="f40" id="f40_#ROWNUM#"/>#ADMIN_USER_CHECKBOX#
In essence the columns are numbered (only the editable ones) in the order in which they appear in the select statement - so the first editable column will be f(01), next f(02) etc - except where the column is specifically named - in this case f(40).
I had a situation where I wanted to programatically stamp the user's name into a column depending on whether the user checked a check-box in each row.
But if the column is editable and visible, then the user is free to type into this cell - this I wanted to avoid.
Something that took me a while to work out is that you can hide an editable column - so it can updated by your procedure code - not by the user!
The way to solve this is to have the sql statement select the relevant column twice - the first one is the editable one and hidden, and the second copy is a normal report column - displayed but not editable.
I used Patrick's example in the link above to set up my tabular form with the first column as a check-box.
The user then marks the desired rows by clicking in the check-box and submits / saves.
The procedure then detects which rows have been checked - updates the editable (but hidden) database column, and then re-displays the result - with the second copy of the same column now showing the updated value!
I hope this helps.
Look at Patrick's other postings - they are so helpful.
Mike

Similar Messages

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

  • Knowing when an item value has changed

    Hello
    If you have a item in a form - :P1_fred which is a database columm fred
    The database table conrtaining fred columm is read and updated by
    1) Automated Row Fetch
    2) Automatic Row Processing
    This works fine
    I need to add a condition based if the valve of :P1_fred has changed.
    My currect way at the monument is to record the value after the Automated Row Fetch to :p1_fred1
    Then compair :P1_fred to :P1_fred1 and before the coniition before Automatic Row Processing
    Whiile this works, is there a simple way of doing this?
    Thanks
    Pete

    Hi Pete,
    I never do "By Reference" (or OUT) for parameters - I tend to create functions instead of procedures and do:
    SELECT check_file_one(:new.key) into status1 FROM DUAL;or something similar.
    From what I can see of the create procedure guide, you can use as many OUT parameters as you like: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6009.htm#sthref7098
    The only time I've seen anything similar is when one process has terminated and cleared out the variables. But this was when I'd have / or GO in the procedure itself.
    What happens if you create a second variable for status1 (say, status1copy) and set this as "status1copy := status1" immediately before the second procedure call - does status1copy retain its value?
    Andy

  • Hello, on Mac, when I make a .pdf from a .doc, Acrobat reverses pagination. How do i stop this and get normal order 1,2, 3 ... ? And how will I know whether any good soul has answered, thanks much.

    Hello, on Mac, when I make a .pdf from a .doc, Acrobat reverses pagination. How do i stop this and get normal order 1,2, 3 ... ? And how will I know whether any good soul has answered, thanks much.

    How are you creating the file, exactly?
    And if you don't manage to solve it you can use this free tool I've developed to reverse the page order in Acrobat with a single click:
    Custom-made Adobe Scripts: Acrobat -- Reverse Page Order (FREE)

  • How to know when the PRICE AFTER DISCOUNT changed and get the value

    Hi,
    Everything I do to see if a value changed in the grid works except for PRICE AFTER DISCOUNT
    which seems to be inaccessible.
    Any idea how to know when exactly this value changed and do actions accordinly ?
    Also I always get 0.00 if I try to get the value of it
    This works to get in the condition of a vlaue changing but I always get 0.00 as the value of the column
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_DISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_DISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
        catch (Exception ex)
            SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    And this do not even get into the condition even tought I SEE the column PRICE AFTER DISCOUNT:
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_PRICEAFTERDISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_PRICEAFTERDISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Price after discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
         catch (Exception ex)
             SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

    just idea, maybe it will works
    Create one udf in row level and set there FS based on changes on price after discount and fill value what is in price after discount. Then the validation make on this field instead of standard SAP field.

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to know whether balance carry forward has happened or not

    How to know , whether balance carry forward has happened or not for a perticular GL account or for the company code as a whole?

    If the account is a balance sheet account, you can merely look at the beginning balance for the same balance sheet account for the beginning of the next fiscal year FS10N. The beginning balance will equal the previous year's ending balance. Since this does not happen automatically, you will know that carry forward has not been done if a balance sheet account has no beginning balance in the following fiscal year.
    If you are talking about For P&L GL accounts, you can check the acvitity in the retained earnings accounts to make sure that they have been updated for the P&L activity. You can identify the retained earnings account by looking at the master data for the account in the section "P&L statmt acct type" and pulling up the menu to see the actual retained earnings account number.
    You can perform carry foward (GVTR) as many times as you want but normally once it has been ran, any postings to a  previous fiscal year are automatically carried forward to the current year after that initial run.

  • How to retrieve a page item value in another page?

    Hi,
    how to retrieve a page item value in another page?
    say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COURSES_TO_EVALUATE value in the next page.How Do I get it?When I try to retrieve the values it simply returns nothing.
    Any pointers would be really helpful.
    Thanks in advance.

    Hi,
    Could you please tell how you try use it ?
    If you set value to item P55_COURSES_TO_EVALUATE and submit page, value is saved to session state.
    Then you can use that item in any page like
    :P55_COURSES_TO_EVALUATEYou can not access page value in javascript/jQuery from other pages like
    $v('P55_COURSES_TO_EVALUATE')
    document.getElementbyID('P55_COURSES_TO_EVALUATE')
    $(#P55_COURSES_TO_EVALUATE)Because item is not in other pages. In javascript from other pages you can use
    var a = '&P55_COURSES_TO_EVALUATE.';Regards,
    Jari

  • How to know whether my Windows Phone 8.1 App is Associated with the store or not?

    How to know whether my Windows Phone 8.1 App is Associated with the store or not? 
    I have an Windows Phone 8 app already in the store , Now i upgraded it to 8.1 it got upgraded to Windows Phone Silverlight 8.1.
    Now iam trying to use Single Sign on feature on this app but it is showing the error message like
    the App is not Configured correctly i followed the process from  Signing users in to OneDrive
    please guide me how to do this?
    Mohan Rajesh Komatlapalli

    You should post to publish forum.

  • How to know whether a method is thread-safe through the java-doc?

    In some book, it says that SAXParserFactory.newSAXParser() is thread-safe,but in the java-doc,it doesn't say that.
    newSAXParser
    public abstract SAXParser newSAXParser()
    throws ParserConfigurationException,
    SAXExceptionCreates a new instance of a SAXParser using the currently configured factory parameters.
    Returns:
    A new instance of a SAXParser.
    Throws:
    ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.
    SAXException - for SAX errors.
    I want to know, how to know whether a method is thread-safe?

    System.out is a PrintStream object. None of the methods there use the synchronized modifier, but if you look in the source code, you will find out it is thread-safe, because it will use synchronized blocks whenever it writes some text.
    The source code is in the src.jar file which you can extract.
    I didn't find any comments about that PrintStream is thread-safe in the API.

  • How to know whether the current database is using a password file or not?

    How to know whether the current database is using a password file or not?

    The remote_password_file is the parameter that determines if you can use or not a password file. The values this parameter can have are NONE, SHARED, EXCLUSIVE. It is pretty obvious, if it is set to either SHARED or EXCLUSIVE the oracle instance has enabled the access through a password file for the SYSDBA and SYSOPER roles.
    ~ Madrid

  • How to identify whether any data source is created for a table?

    hi all,
    How to identify whether any extractions is been carried out for a particular table, view or function module(generic extraction)? from r/3.
    bcos i need to create an extraction for a table, view and function module. But  iam not sure whether any extractions is already been created for those tables, view, function modules??
    thanxs
    haritha

    Hi,
    By passing the following values as selection to table  ROOSOURCE we can find whether any data source has been created or not .
    EXMETHOD = V
    EXTRACTOR = Table name
    hope it helps..
    regards,
    raju

  • How to know whether a connection leak occured in weblogic8.1

    How to Know whether Conenction Leak has Occured or Not ??..Where does the WeblogicServer8.1 print the STACK TRACE if connection Leak has occured ? or does it maintain a LOG FILE , where any entries can be seen................

    To turn on Debug flags add these to the startup scripts.
    -Dweblogic.Debug=weblogic.JDBCConn="true",weblogic.JTAJDBC="true"
    Essentially, you will need to edit the config.xml file (when the server is down) and add the proprty to the ConnectionPool definition:
    http://e-docs.bea.com/wls/docs61/config_xml/mbeans.html
    ConnLeakProfilingEnabled="true"
    Thanks and regards,
    Pazhanikanthan. P

  • How to know whether ipod touch is with ios 5 or ios 4

    how to know whether ipod touch is with ios 5 or ios 4

    What do you mean is there any difference between iOS 4 and 5? There are tons of differences. Too many to cover here.
    I would definitely buy a 4G iPod Touch though as they will be the only generation that supports iOS 6 when it comes out this fall.
    B-rock

  • How to know whether a file is opened  or not ?

    Hi all,
    How to know whether a file is opened by its editor or not ? File may be any of the type.

    There are platform-dependent commands that tell whether a file (or directory, port etc.) is used by which processes.
    [oracle@izsak ~]$ fuser .
    .:                    9299c
    [oracle@izsak ~]$ ps -p  9299 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    9299  9298  0 Apr25 pts/0    00:00:00 -bash
    [oracle@izsak ~]$ ls -l $fn
    -rw-r-----  1 oracle oinstall 111215876 Apr 25 19:05 /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1
    [oracle@izsak ~]$ fuser $fn
    /opt/oracle/product/AS/10g/R2/opmn/logs/OC4J~ebank~default_island~1:  3746  3747  3748  3749  3750  3751  3752  3753  3754  3755  3756  3758  3761  3762  3765  3767  3769  3770  3771 18638 21605 21743 21744 21745 22140 22143
    [oracle@izsak ~]$ ps -p 3746 -f
    UID        PID  PPID  C STIME TTY          TIME CMD
    oracle    3746 26427  0 Apr23 ?        00:00:01 /opt/oracle/product/AS/10g/R2/jdk/bin/java -server -Djava.security.policy=/opt...

Maybe you are looking for

  • Live Capture with a camera via firewire and usb audio interface

    I am trying to do a live capture through Final Cut 7. I want the video feed through the firewire from my HVX200 and the audio feed from a 4 channel usb audio interface (Alesis iO4). When I have both audio and video input coming in from the HVX200, th

  • Data transfer with some errors on registers. (Novice question)

    Hi experts. First of all i wat to say that i'm realtively novice in BW. I have an ods object.  I have a transformation>Data Transfer Processes>Infopackage to load data to it. I execute this with a process chain. well the roblem is that some registers

  • Instaead of writing the page displays little squares, some with numbersin them.

    site briefly for a second or so displays correctly and then displays squares instead of english letters. Some have numbers in them making them look like chinese characters. Displays OK in previous firefox version.

  • I cannot share my Internet connection from my Mac to my iPhone

    When I enter the Sharing settings the box with "share you connection from" only gives me the chance of sharing from WIFI or from Bluetooth PAN, which I have no clue what is. So I assume that it is WIFI I have to click as it is a WIFI connection I wan

  • Require some suggestion related to OCA

    Hi, I have a basic/intermediate knowledge of SQL ( cleared 1st papar of MySQL DEV exam last year), now because of requirement at work , i have been given an additional responsibility to do Oracle related study and certification. I am planning to go f