How to promt user to save changes when changing non-database fields?

Hi,
I have a form with two tabs. The datablock Block_1 on tab_2 is based on a database view. But all the displayed items of Block_1 are non-database items. Whenever a user changes some items in Block_1 and presses save button, the values from non_db items get copied to the db_items (based on view) and commit_form is called. This works fine.
But the problem here is: after changing some items in block_1, if the user navigates to some other option/form from the menu , the form doesnt promt the user to 'save the changes' and all the changes made are lost. How can I fix that?
I have a form level key-exit trigger, (which does not fire) with following code :-
Declare
  X  Number;
  alert_is             alert;
Begin
If :System.Mode = 'ENTER-QUERY' Then
       Exit_Form;
Else
  If :System.Form_Status In ('NEW','QUERY') Then
       alert_is := FIND_ALERT('TMPL_EXIT'); -- "Are you sure you want to exit?"
    X := Show_Alert('TMPL_EXIT');
    If X = Alert_Button1 Then
       Exit_Form(no_validate);
    End If;
    Else
       Exit_Form;
  End If;
End If;
End;

Slava Natapov wrote:
Samita wrote:
Whenever a user changes some items in Block_1 and presses save button, the values from non_db items get copied to the db_items (based on view) and commit_form is called. Try to copy values to the db_items not in save button, but in WHEN-VALIDATE_ITEM of non_db items.- I created the non-db items becoz, it was asking me 'Do you want to save changes', even when I only queried data from the view (becoz i was doing some computations while displaying the items. and the form assumed that the DB items were begin changed ). Inorder to get rid of that problem, i used mirror_items (non-db) for all the db items.
So under this scenario, when i copy values to the db_items in WHEN-VALIDATE_ITEM trigger of non_db items, the form considers the db_items are changed and asks 'Do you want to save changes' even when the user has not made any changes and only queried data.
Edited by: Samita on Dec 9, 2009 10:12 AM

Similar Messages

  • How to prompt users to save changes?

    Hi,
    I am using WAD to develop planning layouts for BIIP.
    I am curious as how to prompt the user to save the changes thay made to the data on the layout if they decide to navigate away from the page.
    Any suggestions?
    thank you

    Hi AG
    Did you find the place choosing the options? I didn't remenber them all, you can try to search these options.If you want to change the default value of this option, you can go to System Administration --> System Configuration --> Service Configuration --> Applications --> com.sap.portal.epcf.loader --> services --> epcfloader. Set the value of Workprotect.mode.default, which default is 1, and other three options are related to 2, 3, 4.
    Best regards.

  • How to prompt users to save changes to layouts

    Hi,
    I am using WAD to develop planning layouts for BIIP.
    I am curious as how to prompt the user to save the changes thay made to the data on the layout if they decide to navigate away from the page.
    Any suggestions?
    thank you
    Message was edited by:
            AG

    They can use Acrobat to save the form.
    If they only have Adobe Reader, they need to Reader extend the form, to enable Adobe Reader to save the form with data.
    Jasmin

  • ARD 3 not prompting user to save changes even when told to

    Hello! I have ARD 3 and when I send out a restart command and select the radio option "Users can save changes or cancel restart" it acts as if I didn't select this, and instead selected "Users lose unsaved changes".
    This has never worked for me. If working properly, it SHOULD actually show up on the affected computer a dialog popup of some sort providing the user just those option: to save changes or cancel restart.
    What is wrong/going on, and how do I fix it?
    Thanks ahead of time,
    Sam Marcus

    Slava Natapov wrote:
    Samita wrote:
    Whenever a user changes some items in Block_1 and presses save button, the values from non_db items get copied to the db_items (based on view) and commit_form is called. Try to copy values to the db_items not in save button, but in WHEN-VALIDATE_ITEM of non_db items.- I created the non-db items becoz, it was asking me 'Do you want to save changes', even when I only queried data from the view (becoz i was doing some computations while displaying the items. and the form assumed that the DB items were begin changed ). Inorder to get rid of that problem, i used mirror_items (non-db) for all the db items.
    So under this scenario, when i copy values to the db_items in WHEN-VALIDATE_ITEM trigger of non_db items, the form considers the db_items are changed and asks 'Do you want to save changes' even when the user has not made any changes and only queried data.
    Edited by: Samita on Dec 9, 2009 10:12 AM

  • ARD 3 not prompting user to save changes on restart

    Hello! I have ARD 3 and when I send out a restart command and select the radio option "Users can save changes or cancel restart" it acts as if I didn't select this, and instead selected "Users lose unsaved changes".
    This has never worked for me. If working properly, it SHOULD actually show up on the affected computer a dialog popup of some sort providing the user just those option: to save changes or cancel restart.
    What is wrong/going on, and how do I fix it?
    Thanks ahead of time,
    Sam M.

    nthali wrote:
    well, onbeforeunload seems to be an IE specific event. we have some customers using firefox etc.It works in at least IE 5.0, FF 1.5 and Safari 1.3. Only not in Opera yet, because it very strictly follows the w3 standards. It doesn't support the onunload either though, which was also invented by Microsoft and adopted by FF and Safari, only a bit earlier than the onbeforeunload.
    And as I already said, the onunload is already too late. The browser will (already) be closed regardless of the (outcome of the) warning message.

  • !!!How to restrict user for making  changes in Sales order , partner level

    Hi all,
    Can anybody tell me how to restrict user for making  changes in Sales order  at partner level, is it through user exit?

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

  • How to create user in local datasource when UME is already switched to LDAP

    HI,
    Info : I have portal ( NW 700),  recently i switched the datasource of portal to LDAP from local datasource.
    issue: if i create user in portal it get created in LDAP, i want create few users in Local datasource.
    how to create user in local datasource when UME is already switched to LDAP?
    one solution is change the ume back to local datasource > create user > then switch back to LDAP.
    do you know any other sol?
    Regards
    Shridhar Gowda

    Please let me know the Datasource file name .. i.e. the .xml filename.
    try to analyze this name and see whether you get a solution or post it here.
    Reward points if helpful -

  • Prompting user to save changes before leaving jsp

    Folks,
    I want to be able to prompt the user to save changes on the page that he's on, before he navigates to a different one. one idea i explored is using the body onUnload event. the problem is that my page is split into multiple jsps with tiles, and the body tag is in a common tile that i can't really access.
    Any other ideas on how to do this?
    Thanks,
    Nilesh

    nthali wrote:
    well, onbeforeunload seems to be an IE specific event. we have some customers using firefox etc.It works in at least IE 5.0, FF 1.5 and Safari 1.3. Only not in Opera yet, because it very strictly follows the w3 standards. It doesn't support the onunload either though, which was also invented by Microsoft and adopted by FF and Safari, only a bit earlier than the onbeforeunload.
    And as I already said, the onunload is already too late. The browser will (already) be closed regardless of the (outcome of the) warning message.

  • Prompt user to save change before abnormally closing the application

    Hi,
    I've some trouble prompting user to save change before abnormally closing the application (logging off, shutdownding machine...). I tried to use Runtime.getRuntime().addShutdownHook() and it doesn't seem to work. Here's part of my code. Help please!!!
    program print out "1" and stays in a "dead-lock" mode...
    private void shutdown() {
    boolean saveConfig = true;
    if (saveConfig) {
    System.out.println("1 ");
    int answer = JOptionPane.showConfirmDialog(null,
    "Configuration has been changed. Do you want to save
    configuration before exit?",
    "Save Config"
    JOptionPane.
    YES_NO_CANCEL_OPTION);
    JOptionPane.showMessageDialog(this, "Can't connect to unit. Error in Heal unit!", "Error", JOptionPane.INFORMATION_MESSAGE);
    System.out.println("2 ");
    if (answer == 0) {
    savefileButton_actionPerformed();
    jMenuFileExit_actionPerformed();
    else if (answer == 1) {
    jMenuFileExit_actionPerformed();
    else {
    return;
    else {
    int answer = JOptionPane.showConfirmDialog(itself,
    "Are you sure you want to exit? ",
    "Exit",
    JOptionPane.YES_NO_OPTION);
    if (answer == 0) {
    jMenuFileExit_actionPerformed();
    else {
    return;
    private class MyShutdownHook extends Thread {
    public void run() {
    shutdown();
    // add shutdown hook
    MyShutdownHook shutdownHook = new MyShutdownHook();
    Runtime.getRuntime().addShutdownHook(shutdownHook);

    doesn't much matter. shutdown hooks are not guaranteed to run or be able to finish.

  • How to block displaying message "Save changes to file 'Test1' " in BEx?

    Hello, dear colleagues!
    Do You know how to block displaying message "Save changes to file 'Test1' " in BEx?
    I need some BEx setting which can block it and make it the same way as You close common Excel workbook without any changes made to it after opening e.g. without any messages, just clicking the cross. 
    Thank You all very much in advance!
    Val
    Edited by: vtb777 on Nov 21, 2011 1:46 PM
    Edited by: vtb777 on Nov 21, 2011 1:50 PM
    Edited by: vtb777 on Nov 21, 2011 1:52 PM

    from time to time i am working with macroses, but they are not good for the report's reliability.
    maybe You have some example of such macros?
    UPDATE:
    I have tried to edit event, called WorkbookBeforeClose in module BExEventHandler, adding there such a line:
    Application.DisplayAlerts = False
    but no result. maybe there are some other ways of solving this problem?
    Edited by: vtb777 on Nov 22, 2011 6:26 AM
    UPDATE-2:
    I got such a code, but it doesn't work:
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    If MsgBox("Save changes to file? " & Name, vbYesNo, "") = vbNo Then
       Cancel = True
    End If
    End Sub
    Edited by: vtb777 on Nov 22, 2011 11:07 AM
    Edited by: vtb777 on Nov 22, 2011 11:16 AM
    Edited by: vtb777 on Nov 22, 2011 11:20 AM

  • Address book won't save changes to note field

    Like the header says. Address book won't save changes to note field. There's another thread with the same header:  https://discussions.apple.com/thread/2591053?threadID=2591053  But it's archived so I had to post this new one.
    If I made a change in any non-note field however, it would stay.
    Note: the notes field can be edited with actually having to go into official "edit" mode. Does this make it more prone to corruption? Why would Apple make the notes field NOT need that extra step of protection. Do they think my notes aren't as important?  How would they know?
    I fixed this one card with a bandaid solution by exporting it and reimporting it.  But I guess I need to do that with all 2,000 of my contacts now. It was mentioned on theother thread that somebody made an address book backup and then deleted every contact in the address book and imported them fresh from the backup and that worked.
    The underlyilng issue is still not solved though. How could this happpen in the first place, and how do I know what other contacts haven't held lthe changes I thought I made?

    Hi,
    Using the Note field
    You can add notes to any contact in Address Book. This makes it easy to keep track of details about a person in your address book.
    Select the person in the Name column in Address Book, then click the Note field in the card.
    The Note field can be edited at any time, even if the card is not in edit mode.
    You could make a dedicated field that requires the edit button...
    Using custom labels
    You can change the label that appears next to a piece of information on a contact's card. For example, you might want to change "work" to "support" next to a phone number.
    Select the contact that you want to change.
    Click the Edit button at the bottom of the window.
    Click the label next to a field, then choose Custom from the pop-up menu.
    Enter a new label for the field.
    The new custom label appears on this contact's card only.
    If you want to change a specific label on all cards in your Address Book, edit the card template. Choose Address Book > Preferences and click Template. The Template pane also allows you to add other types of fields on contact cards, such as a nickname, job title, birthday, anniversary, and URL. Use the Add Field menu.

  • How do I get a value from a portal form for a non database field ? HELP!!

    I have a form based off of a table that I added a field to. The form is to allow the user to change abbreviation for a
    department field ie. BIO to BIOL. for a biology department. I have a pl/sql procedure for validation using the custom option
    on the update button to verify the user and update the data. I have tested to code at the sql prompt and it works.
    They only difference between the prompt and the form is the non-database field new_dept_abbr was added to the
    form. I don't know how to capture the value of the user input into a variable that can be used in the pl/sql.
    Any help would be appreciated.
    I have tried this approach
    v_new_dept_abbr := p_session.get_value_as_varchar2(
    p_block_name => 'default',
    p_attribute_name => 'new_dept_abbr'
    have tried using p_attribute_name as 'a_new_dept_abbr' but this does work and does not exist in the body of the form.
    Have also tried setting the p_block_name to _session - still doesn't work.
    Any ideas??
    Thanks
    Debbie Brennan

    Thanks for the info. I tried that and it still doesn't pull the value. I have opened a TAR via metalink, but I'm not getting any
    satisfactory answers. I ran across an note - 137172.1 that has this snippet of information in it.
    Unfortunately, at this time (portal 3.0.7.6.2) , a non-table item cannot be
    referenced in a plsql event handler, only in client side JavaScript code. This
    is a known limitation and will be fixed in a future release.
    I don't know how to get the value from the client side JavaScript code to a pl/sql variable. Do you?
    I've been trying to get them to tell me if the 'known issue' has been addressed in 3.0.9.
    I'll keep at it. Thanks so much for your suggestion I appreciate it.
    Deb

  • How to display records from a query into non-database field

    Hi
    I a have a problem:
    I have a query with many tables and 6 column(select a,b,c,d,e,f from x,y,z,t,s,g where conditions) and I use 3 parameters.
    I create 3 parameters :datai,:dataf and :partener and a button with a trigger when button is pressed.
    Then a create a manualy block with six field non-database a1,b1,c1,d1,e1,f1.
    Now I want to display all the records from my query into a1,b1,c1,d1,e1,f1 where a1=a,b1=b,etc. and all the records (if I have 20 record, it will display 20 records in non-database field) when I press the button.
    How I made:
    I create a cursor with query then
    begin open cursor
    loop
    fetch cursor into :a1,:b1,:c1,:d1,:e1,:f1;
    end loop;
    close cursor;
    end;
    It display one record in a1,b1,c1 only and it have to display 100 records and are date for all the fields.
    Can somebody help me in this problem?
    Thanks.
    Edited by: 928437 on Oct 1, 2012 2:55 AM

    Creating a view, and querying that into a database block is an excellent solution.
    To use the non-database block:
    You're missing the all-important Next_Record; command.
    <pre> Begin
    Go_block('X'); -- block X is the non-database block
    Clear_Block(No_Validate);
    open cursor X1;
    loop
    If :System.Record_status != 'NEW' then
    Next_Record;
    End if;
    fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
    Exit when X1%NOTFOUND;
    end loop;
    close X1;
    end;</pre>

  • Allowing a user to save changes

    I am creating an app that is something similar to this one:-
    http://demo.quietlyscheming.com/DragTile/DragDrop.html
    However what I want is when a user drags an item from one tilelist into the other tilelist for them to be able to save these changes so that when they close the application and reopen it these changes will still be there i.e. if the top tilelist is tilelist1 and the bottom tilelist is tilelist2 and the user drags a couple of items to tilelist1 TO tilelist2 I want these items to appear in tilelist 2 after the app has been closed and reopened and the items that have been moved NOT to appear in tilelist 1 anymore.
    I also want the user to be able to type their name into a text area and save it by clicking a save button so their name will also be shown next time they open the app.
    What is the best way to do this? Via xml perhaps? I've used xml to contain data that populates a site in the past but never used it where it allows user's to actually insert data into an xml file. Are there any examples of anything simiar that may help me out?

    That may work but I'm not sure on how to apply it to my own application. Here's a little bit of my code to show you what I mean. The button marked "populate" populates the left hand tilelist when clicked and also acts as a reset button if the user wants to reset the links back to normal. What I want is when the button marked "save" is clicked for all the changes a user has made to both tilelists to be saved. How can the following code be edited to allow that:-
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.*; 
    private function profile1NewsAndSportReset():void {profile1NewsAndSportAddLinksTilelist.dataProvider =
    new ArrayCollection([{link:
    "www.bbcnews.com", label:"BBC News", icon:"image7", largeImage:"assets/images/bbcnews_small.png", title:"BBC News", description:"BBC News description will go here"},{link:
    "www.itv.com/", label:"ITV", icon:"image5", largeImage:"assets/images/itv_small.png", title:"ITV", description:"ITV Description will go here"},{link:
    "www.skynews.com", label:"Sky News", icon:"image10", largeImage:"assets/images/skynews_small.png", title:"Sky News", description:"Sky News Description will go here"},]);
    profile1NewsAndSportLinkChoice.dataProvider =
    new ArrayCollection([]);}
    ]]>
    </mx:Script>
    <mx:Button click="profile1NewsAndSportReset()" id="pop" label="populate tilelists" y="0"/>
    <mx:TileList id="profile1NewsAndSportLinkChoice" fontWeight="bold" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" height="292" width="650" top="0" left="521" columnCount="5" rowHeight="145" columnWidth="125" doubleClickEnabled="true" backgroundColor="#000000" borderColor="#FFFFFF" color="#FFFFFF" borderSides="top right left"/> 
    <mx:TileList id="profile1NewsAndSportAddLinksTilelist" fontWeight="bold" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" height="419" width="385" top="0" left="128" columnCount="3" rowHeight="145" columnWidth="125" doubleClickEnabled="true" backgroundColor="#000000" borderColor="#FFFFFF" color="#FFFFFF" borderStyle="solid" borderThickness="2" dropShadowEnabled="true"/>
    <mx:Button click="" id="save" label="Save Changes" x="0" y="30"/>
     </mx:WindowedApplication>

  • HFM: How to restrict user to generate reports when there is a data load process going on?

    Hi Experts,
    I want to get some idea on how we can restrict one user of generating report when another user is loading the data for the same entity, assuming both the users were at different location and there is no communication between them.
    i am dealing same kind of problem in HFM. we have many users created, some users will be loading the data using FDMEE while some users will be generating the reports. the problem arises when one user is loading the data for a particular entity and at the same time another generates the report for the same entity. this shows wrong data in the reports as the data's were not updated.
    please suggest how we can come out of this problem.
    Thanks in advance for your valuable suggestions.

    I thought for a while that I could solve the problem creating a parameter in the main report and casting the first argument of my subreportprocesssing event handler to LocalReport and setting the parameter using the SetParameters method of the LocalReport
    object indicating when there was data to show or not. But this doesn't worked , the parameter value remains the same when I use it in expressions to change the visibility property of my subreports.
    Codelines

Maybe you are looking for

  • Trying to make a link under and object on the same timeline in-active

    Hello Flash pros, I am wonder if there is a way to make a linked object deactivate if another object appears above it in my swf file. Basically when mousing over the a image that covers the link object, the hot spot still works which give the impress

  • How can you add cds on the new i-tunes

    Like a idiot I uploaded the new i-tunes softwear. Its ******* **** and now cant add any new cds to my libary of 3500 cds. You cant create new folders to name after the artist or add the new cd to the folder. I dont use use i-tunes downloads as will o

  • Screen painter not working with gui 7.1

    Hi, I am using sap gui 7.1 in this im noit able to use screen painter, so im using alphanumeric painter.. I also tried with 6.4 but again same prob So, what could be the problem?

  • Ai cs5.1 won't open after Yosemite install

    hi - all my other adobe products open, except for ai cs5.1. the msg that I receive is: An unknown error has occurred (-50). Adobe illustrator will quit now. has anyone else experienced this? thanks!

  • Unabel to connect SQLState=IM001

    Hi all, I am trying to connect to the server throught the Oracle client 9.2.0.1 I get the following error message Unable to connect SqlState=IM001 *[Microsoft][ODBC Driver Manager] Driver does not support this Function.* I copied the 9.2.0.2 ODBC div