[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== How to exit form without save message (OpenInsight Specific) ====
=== At 30 JUL 1999 04:25:10PM CT Savell wrote: ===
{{tag>"OpenInsight Specific"}}
I created a form which uses EditTable with each row as a separate record with one of the columns containing the record keys. Just like the old TableBrowser, "TBLZ". I have one problem, however, as well as a general question on EditTable.
When I exit the form I receive the system message prompt: "Would you like to save the changes to the entry?" If I say 'Y' then I receive the Read/Write Error associated with the EditTable: "All key values are empty." Which of course is correct for the EditTable which has no OI table association. (I used GOTFOCUS to associate the rows of EditTable to my OI data table. My data record items are saved to the separate OI data table with a Button event. The process works fine and everything is grand if I answer 'N' to the original system prompt. However of course, I do not want any message upon exiting since I have already saved the data. I just want to return to the previous parent form non recursively. The form with my EditTable screen is called from a menu.
I have tried unchecking the window property check box "System Menu" which greys out the "x" icon in window upper right corner and then use a button to close the form with a CLOSE quick event but I get the same system menu. I was also thinking about associating the EditTable to a dummy OI file and have the key to that table as an invisible constant value but I think that would screw things up even more and make everything very complicated.
Is there any way around this so I can close the window when changes have been made to the EditTable without getting the system message prompt? If not any suggestions on how to get my "Table Browser" input screen functionality.
Now for my general question on EditTable. I understand there is a 64K limit to the data string that is carried by EditTable. Also remember that you can get around this limit by entering -1 as the Row limit. Is this correct? If so is there then any limits or special concerns with the data size using -1?
----
=== At 31 JUL 1999 01:27PM Dave Pociu wrote: ===
Try :
=set_property( @window , 'SAVEWARN' , 0)
after any programatic fill of fields in the window.
Dave Pociu
----
=== At 31 JUL 1999 07:38PM CT Savell wrote: ===
Thanks Dave, that worked great.
Is there any way of modify the exit message if the user presses the 'x' icon in the upper right corner of the window without first saving the data to say "You have modified the data. Are you sure you wish to exit without first saving (Y/N)?" or something to that effect. My thought is to change the SAVEWARN on the CLICK event of my save button and then the SAVEWARN value would only be zero if the user had either saved or never modified the data. What do you think?
Tom
----
=== At 04 AUG 1999 09:57AM Dave Pociu wrote: ===
Haven't done it myslf, but I think you can intercept the system message event, check if it's the SAVEWARN message that's about to be displayed and display your own.
Dave Pociu
d.pociu@snet.net
----
=== At 04 AUG 1999 11:30AM CT Savell wrote: ===
Thanks, I'll see if I can figure it out.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=610A42FB78952766852567BE00702B0E|View this thread on the forum...]]