Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: How To Determine The Record Successfully Insert When Press OK Button 2005-01-04 -- Maarten Veenstra > The Insert is actually done by the .TakeCompleted method (in the form).
> So in the .TakeCompleted method, after the parent call, test the value that
> was returned by the parent call.
If I may expand on that:
When the form is called for Change and nothing was changed
when the [Ok]-button was pressed, TakeCompleted will return
RequestCompleted but nothing is written to disk!
You must check Primary.Me.EqualBuffer() to determin if
there is an actual write. However, when this form is called for
Delete, EqualBuffer() will tell you nothing has changed but
the record -was- deleted from the file.
So, my complete code is:
IF SELF.Response = RequestCompleted AND | !Check for real changes
(NOT SELF.Primary.Me.EqualBuffer(SELF.Saved) OR SELF.Request = DeleteRecord)
!Action! - do something
END
Today is November 23, 2024, 2:12 am This article has been viewed 35261 times.
|
|