Apex Collection - tracking changes/updates on cells

I created an apex collections page which displays and allows user to update the array/matrix/cells.
I created a button to apply and save the changes; this process is working fine for update/insert as necessary.
I'm struggling on a couple of points:
1. If the user gets out of the page or do a refresh, I wanted to show an error or message that when a cell has been updated in the page, to display an error-like " that there are unsaved changes". And let them click on the update button I created. I read that there is the function called COLLECTION_HAS_CHANGED however, I'm not quite sure how to make it work with Dynamic Action.
Any guidance is greatly appreciated. Thanks.
2 Updating a cell value from not null to null is a bit of a challenge.
The question is: Is there a way to find if a cell's value is changed from not null to null during the time I'm performing update_member_attribute ?
(The update_member_attribute I found on the forum and I am using is handling it using IS NOT NULL -- I think this is good because it will avoid me getting a bunch of records inserted if the cells are indeed NULL (before and after).
below is the part of the code I'm referring to ...
FOR i IN 1.. APEX_APPLICATION.G_F02.COUNT LOOP
IF apex_application.g_f02 (i) IS NOT NULL THEN
APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE (
p_collection_name => 'COLLECTION1',
p_seq => i,
p_attr_number => 2,
p_attr_value => apex_application.g_f02 (i));
END IF;
END LOOP;
I could removed the NOT NULL IF condition, but I only wanted to do the null update when there was a value previously.
Thanks.

user12941774 wrote:
I created an apex collections page which displays and allows user to update the array/matrix/cells.
I created a button to apply and save the changes; this process is working fine for update/insert as necessary.
I'm struggling on a couple of points:
1. If the user gets out of the page or do a refresh, I wanted to show an error or message that when a cell has been updated in the page, to display an error-like " that there are
unsaved changes". And let them click on the update button I created. I read that there is the function called COLLECTION_HAS_CHANGED however, I'm not quite sure how to make
it work with Dynamic Action.COLLECTION_HAS_CHANGED This will be useful if the data has changed on the server side, and you are talking about user navigating away without saving the changes that means the data is entered only on the client/browser side.
For handling that you can use this plugin http://apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/skillbuilders-save-before-exit_43.html
Any guidance is greatly appreciated. Thanks.
2 Updating a cell value from not null to null is a bit of a challenge. Why do you think its a challenge?
You will be updating a cell value based on the user entry, no matter if it is null or not null.
The question is: Is there a way to find if a cell's value is changed from not null to null during the time I'm performing update_member_attribute ?
(The update_member_attribute I found on the forum and I am using is handling it using IS NOT NULL -- I think this is good because it will avoid me getting a bunch of records inserted if the cells are indeed NULL (before and after).
below is the part of the code I'm referring to ...
FOR i IN 1.. APEX_APPLICATION.G_F02.COUNT LOOP
IF apex_application.g_f02 (i) IS NOT NULL THEN
APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE (
p_collection_name => 'COLLECTION1',
p_seq => i,
p_attr_number => 2,
p_attr_value => apex_application.g_f02 (i));
END IF;
END LOOP;*Always include code between {noformat}{noformat} tags, it is more readable*

Similar Messages

  • Table Cell - On change updates another Cell using SQL

    Hello All,
    Tried to search the forums with no luck.
    I am looking for a solution similiar to Denes's solution on his APEX demo page
    http://htmldb.oracle.com/pls/otn/f?p=31517:160
    (Javascript Set Display Item I)
    I have a table with a drop down list showing a list of staff members
    When the user selects a staff member I want an Onchange command that
    populates another tablle cell with the managers name
    the SQL to obtain the manager would be somehting like this
    Select staff.Manager From from STAFF where staff.userid = staffmembers
    I know I need to create a onchange command and pass the value to the called function.
    I just need help to create the javascript that obtains the data and passes the info back
    Hope this is a simple question for someone (not me lol!)
    Frank

    dear frank,
    i also had similar requirement. I had one page item and one button. based on some page item value the color of button need to be changed. For example, in a hotel when one of the room is occupied based on the occupatiuon status, the button labeled room no need to be displayed either as green or red. This was met by writing some ajax code on the button attributes. Later he himself written using simple display attributes html code on the button. I am not good at ajax, html and good only at sql. Since my need was met, i did not penetrate the issue of how it was done. i will try to locate the coding to alter conditional border display issue.
    yours
    dr.s.raghu

  • Track Changes -- Author Color

    I have made one set of changes in a doc in blue.  I now want to add a second set of changes without eliminating or changing the first set.  Can I add the 2nd set of changes in a new color ...e.g. green, while still keeping the first set of changes in blue?

    Look page #71 in Pages User Guide.
    Your question is answered just above the title :
    Tracking Changes in Table Cells
    Yvan KOENIG (VALLAURIS, France) jeudi 28 avril 2011 20:29:33
    Please :
    Search for questions similar to your own before submitting them to the community

  • How to track changes when a contact updates contacts address section?

    I'm creating a workflow to create an integration event when a contact updates its contacts address section (number/street, address2, address3 city, state, zip).
    Record Type: Contact
    Trigger Event: When Modified record saved
    Workflow Rule Condition: None
    Action Type: Integration Event
    When I go to configure the workflow action, I don't see the address on the track changes list. How do I specifiy the address section to be tracked when it's modified?
    Thanks

    The best way would be to create a trigger in the database that would update the history table whenever the data was changed. The next best would be to use a stored procedure. I would not try to do this with server side scripting.

  • Pages "Track Changes" does not work when working in cells in a document

    While attempting to edit a WORD file (converted to Pages for my macbook) it was discovered that the Track Changes feature will not register if the changes are inside a "cell" in the file.  The RFP I am trying to respond to is made up of multiple columns and rows.  Anytime you make a change inside the columns or rows the "Track Changes" does not record the change.  Outside of the columns/rows it works perfectly.
    I download the most recent OS and Pages file last week.  The issue started then.
    Has anyone had this issue before?

    Yes.

  • Apex Collection- Tabular Form

    Hi
    is there anyway to make a tabular form depends on apex collections, for example i have a collection named "Orders" and i want to add member to this collection by tabular form , is it possible?
    Thanks in advance

    Sure, build a manual tabular form
    SELECT APEX_ITEM.TEXT(1,AC.c001)
              ,APEX_ITEM.TEXTAREA(1,AC.c002)
    FROM apex_collections AC
    WHERE collection_name = <collection name>I can also think of an approach to get this working with a Wizard based tabular form(I haven't tried this before,but I don't see any reason why it shouldn't work).
    --Create a view referring the collection.
    --Change your tabular form to reference the view
    --Add insert,update and delete triggers on the view to handle those processes on the appropriate table(s).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Apex Collections and dates

    Apex Collections and Dates
    I made an earlier posting today on the forum titled “‘ORA-01861: literal does not match format string’ error after my hosting company upgraded to Apex 3.2.” The issue relates to Apex collections and dates. Prior to the hosting company upgrading Apex 3.2 from 3.1 all was working OK. It seemed a reasonable assumption that the issue relates to the upgrade to 3.2. Having tested the code against another Apex 3.2 installation I am satisfied that the issue is not with Apex 3.2. That said, I am still getting the issue on the hosting site.
    To demonstrate the issue to my hosting company and this forum, I put together a simple one page application that demonstrates the issue using the least amount of code.
    I created a page with an ‘On Load – Before header” process that sets up an Apex Collection with a single value of ’20-FEB-2009’ in the c001 element as follows:
    if apex_collection.collection_exists(p_collection_name=>'THEISSUE') then
    apex_collection.delete_collection(p_collection_name=>'THEISSUE');
    end if;
    apex_collection.create_collection(p_collection_name => 'THEISSUE');
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'THEISSUE',
    p_c001 => '20-FEB-2009');
    I added an SQL REPORT region to the page which uses the Apex Collection as follows:
    select to_date(c001,'DD-MON-YYYY') testdate
    from apex_collections
    where collection_name='THEISSUE'
    and to_date('20-FEB-2009','DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    When the page is run I get the ‘ORA-01861: literal does not match format string’ error.
    If I remove the following from the SQL Report Region:
    and to_date('20-FEB-2009','DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    and run the page, the date is displayed OK, i.e., c001 is converted to a date OK. This made me wonder whether it does not like the line to_date('20-FEB-2009','DD-MON-YYYY')? So I changed the where code for the report to :
    and to_date(c001,'DD-MON-YYYY')
    = to_date(c001,'DD-MON-YYYY')
    i.e., convert c001 to a date and compare it to itself. The rationale being that if the c001 converts to a date OK, then comparing c001 converted to a date with itself should not give an error. It did it gave the same error ‘ORA-01861’
    It would seem on my hosting site since the upgrade, that Apex and Oracle have problems with Apex Collection elements being converted to dates as part of the where clause.
    Now my understating of Oracle Apex collections in simple terms is that all Apex collections are held in a single Oracle table managed by a series of Apex functions. Given that all Apex collections are in the same table, could the issue be with the Oracle database when it is creating its execution plan for the query? Could Oracle be including the value of c001 from other collections (i.e., when c001 is not in a date format ) in the initial stages of its execution plan?
    I hope the above make sense and thanks in advance.
    Ian

    Scott,
    I believe I have found the answer the statistics on WWV_FLOW_COLLECTIONS$ and WWV_FLOW_COLLECTION_MEMBERS$. are out of date and Oracle is doing a full table scan instead of using the indices to select only the c001 columns that belong to the given collection_id. If I change my simple example to store the date value in c050 it works ok. (In all probability this will be the only collection on the hosted database to use c050).
    I have asked the hosting company to gather stats on all the apex tables.
    Thanks for your help
    Ian

  • Exporting Track Changes to Word no longer works

    Just like it says in the subject line: It used to be that I could get a Word doc with Track Changes on and comments from my editor, do my own changes/add comments, then export it as a Word doc no problem. Now Pages either refuses to export the document or mangles it when exporting, causing certain changes to be automatically accepted or declined.
    I was hoping that today's iCloud update for iWork would have this little bug fix in it, but no luck. Has anyone else encountered this and does anyone have any suggestions for how to fix it?
    Thanks!

    I think your problem could be a simple one of corrupt preferences. I think Yvan's script removes them, but maybe not. When something that used to work stops doing so, the most likely culprit is corrupt preferences. Go to HD > Users > (your account) > Library > Preferences, delete the com.apple.iwork.pages.plist file & then restart Pages. In Finder, hold down the Option key while clicking on the Go menu & your user Library will appear about halfway down the list.

  • How do you copy and paste track changes material in Pages from one point in a document to another and keep both the old text along with the track changed thus far in the new pasted location?

    Depending on whether track changes is on/paused, Pages thinks the pasted material is either all new and thus highlights it as a big track change or just copies the old material along with the edits as plain text so that I cannot see my track changes. I need to be able to copy and paste in the same document and still be able to see the older text along with the changes to certain sections thus far. Is this possible? I need a step-by-step "talk to me like I'm five" instructional if what I would like can be done.
    Thanks for any help!
    Message was edited by: C.M.W.

    What version of Pages?
    What OS, iOS or OSX?
    Are you sure you have the Table selected and not a cell or just contents?
    Peter

  • How to track changes in inputs in a form?

    Dear Masters,
    I have an update page generated by dreamweaver which works correctly. But I need to implement something else additionally to my application developed in classical asp environment.
    I want to track changes in the form in my update page and save them to another table in ms sql database.
    My update page updates orders table but I want to save changing information to logdetail table in the database.
    One of the main problem is that even if i use a javascript code there is a problem like that if a user chose b from a and b couple and return to change a value again it is a problem. I need the final changing info.
    Another problem is that even if i determine the changing inputs (textfields and list/menus)  how can i insert in to logdetail table?
    Because my form updates order table when i press submit button. How can i do that?
    If someone can help me about that i  would be gratefull
    thanks in advance
    Ces

    The best way would be to create a trigger in the database that would update the history table whenever the data was changed. The next best would be to use a stored procedure. I would not try to do this with server side scripting.

  • How to Track Changes in G/L Master ?

    Hi,
    I have a requirement to track changes in G/L master either in company code or chart of account.
    For this there is a BTE but at the time of BTE calling table CDHDR is not updating, also for this there is no exit or badi exist.
    Please suggest.
    Regards,
    Sooraj Saini

    Hi Sooraj
    we have GL account settings maintained in SPRO " define Gl account for product categories"
    If you are talking about these then they are stored in table bbp_det_account
    There you will see all the entries further to maintain the log of the same go to se11
    technical settiings and check the below option
    Here you will see the Log changes activate it and you would be able to see ..

  • Why do Track Changes no longer show up when document is saved as .doc?

    I've used iWork for many years to collaborate with people in numerous other organizations who almost all use MS Office and are mostly on Windows. This year, the documents I send them, supposedly saved in Office formats, cause freezes, don't open, and even when they do, don't show Track Changes any more. That makes collaboration on document creation almost impossible. Workarounds? Solutions?
    Does anyone know if Apple is going to do a real update to iWork to bring it in line with current MS Office versions? If not, I'm going to have to give up on it and that will take endless work since I'm going to have to create new templates and sample docs from scratch. Anything I convert and import from iWork causes problems and the Open Office/ Libre Office suites don't even accept iWork docs at all. I hate to go back to using Microsoft products.

    I was still on Leopard when it started this spring (I suspect it started with updates others did for MS Office). I never used Snow Leopard or Lion on my desktop. Documents sent to collaborators or cllients started not opening or freezing or being Read Only through I had not sent Read Only docs. I hoped the upgrade to iWork that was available once I bought Mountain Lion would help and it did in terms of documents opening but not for editing.
    This happens with Pages and Numbers and I'm hearing it from others, and hearing they are also having this problem with Keynote. I'm about to collaborate on a presentation for a third party webinar and suspect it won't be worth developing it in Keynote from what I'm hearing. The problems have by now happened with dozens of collaborators in different organizations, countries, etc., including people with high level tech skills, so it's definitely at my end.
    I have tried on another computer (my laptop, which had the problem during Snow Leopard and still does under Mountain Lion). as well as other accounts; that doesn't make a difference.
    Throughout I've run whatever the latest iWork version was, but the upgrades have been minimal. It appears Apple plans to let iWork die.

  • Microsoft word 2008 crashes abruptly when trying to use track changes

    Hi,
    I believe this may be related to recently downloading Yosemite:
    Every time I try to use Microsoft Word (2008) with "track changes" on, Word shuts off abruptly.
    Has any one else had this problem?  Is there a way to fix it?
    I've already tried Disk Utility - disk & disk permissions repair.
    Help would be greatly appreciated.
    Thanks.

    You should note that this forum is for troubleshooting Apple Software Update for Windows, a software package for Windows designed to update Apple products that run on Windows, and not related to Microsoft Office or your question in any way. If you have issues or questions about Office, it's probably best you post Office related questions on Microsoft's own forums for their Mac products.
    http://www.officeformac.com/productforums

  • How can I export comments and tracked changes from Pages to Word?

    I just purchased Pages and tried to export a couple pages of my document to Microsoft Word so I could send them for review to a client who does not have Pages; however, when I copy-pasted into Word, none of the comments or tracked changes showed up in the doc., only the finished product. I've tried updating my software, but that hasn't worked. Is there a way to fix this?

    Here is what the Pages User Guide says:
    " Exporting Pages Documents to Other File Formats
    If you want to share your Pages documents with those who aren’t using the latest version of Pages, you can export your document to file formats that they may be able to use on their computers or other devices:
    • PDF: You can view PDF files in iBooks, and view or print them in Preview and Safari. You can edit them with a PDF application. Fonts used in the Pages document are preserved in the PDF file.
    Hyperlinks in your Pages document are exported to the PDF file. Hyperlinks are also created in the PDF file for table of contents entries, footnotes and endnotes, webpages, email addresses, and bookmarks.
    • Microsoft Word: You can open and edit Microsoft Word files in Microsoft Word on a computer running Mac OS X or Windows.
    Because of text layout differences between Microsoft Word and Pages, an exported Word document may contain a different number of pages than its Pages counterpart. You may notice other differences, as well, for example, table layouts and some special typographic features may not be identical. Some graphics (particularly those using transparency) may not display as well. Charts created in Pages appear as MS Graph objects, which you can edit in Microsoft Word.
    • RTF: You can open and edit RTF files in many different word processors. RTF files retain most of the text formatting and graphics.
    • Plain text: You can open and edit plain text files in many text editing applications, such as TextEdit. Exporting to plain text removes all document and text formatting, and images aren’t exported. ePub: You can open ePub files for reading in the iBooks application on an iPad, iPhone, or iPod touch, or in any ePub file reader. After you export your document to ePub format, you must transfer it to your device to read it in iBooks. To learn more about optimizing a document for ePub format, exporting it, and transferring it to your device, see “Creating an ePub Document to Read in iBooks” on page 257.
    If your Pages document is password-protected, the password-protection is removed from the new file that's created upon export. However, if you export to the PDF file format, you can apply a new password at the time of export. "

  • Help with APEX.COLLECTIONS in v. 3.2

    Hello, we are trying to create an apex.collection in our program similar to the one used in the sample application "Matrix Order 1.0"
    Working Code used in "Matrix Order 1.0" is as follows:
    if APEX_COLLECTION.COLLECTION_EXISTS (p_collection_name => 'MATRIX' ) then
    APEX_COLLECTION.DELETE_COLLECTION (p_collection_name => 'MATRIX' );
    end if;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'MATRIX',
    p_query => 'select PRO_STYLE,PRO_COLOUR,PRO_UNIT_PRICE,S,M,L,XL from MATRIX_PRODUCTS_BY_SIZE order by 1,2,3' );
    What we've tried in ours is as follows:
    if APEX_COLLECTION.COLLECTION_EXISTS (p_collection_name => 'TRAINING' ) then
    APEX_COLLECTION.DELETE_COLLECTION (p_collection_name => 'TRAINING' );
    end if;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'TRAINING',
    p_query => 'select * from IDEAS_USERS_VIEW' );
    End result is a message stating "no data found"
    Any thoughts?
    Additional information:
    we've tried above creating a view from a table, we've also tried putting the table name right in the query field - same results.
    we've also tried several over variations of the code found on the web such as the following:
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'TRAINING',
    p_query => 'select * from IDEAS_USERS_VIEW' ,
    p_generate_md5 => 'NO' );
    Again - same result - "no data found"
    Please Help!

    My teammate figured it out.
    the problem was under the Conditional Processing section they had the following set:
    Condition Type = "Request = Expression 1"
    Expression 1 = NEW
    Solution was to set to "No Condition" and deleted the value of "NEW"
    I'm sure we'll be back soon with questions on how to update and store it.... stay tuned.

Maybe you are looking for