Normal Topic Record Modified Pop-Ups (Read 1758 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Record Modified Pop-Ups
Oct 17th, 2018 at 3:09pm
Print Post Print Post  
Hello, I'm getting a couple different pop-ups at different points and I understand what they're saying, I think, and I've reviewed the documentation to determine what causes these pop-ups to occur but I'm not clear on why they're occurring in my case.

When opening a record:

"The current record has been changed and has not been committed to the database. This operation will automatically commit the record. Continue? Yes / No"

I'm not for sure, but I believe this one only pops up if I run PopulateListElement on Form Entry. But I don't understand how it's modifying the record, and it didn't seem to cause this pop up before.

When exiting a record:

"The current record has been changed and has not been committed to the database. Are you sure you want to close this record? Yes / No"

And on the exiting one, it opens when I run a schedule report even if I haven't modified a single field in the record group. And it also runs when I exit (go back to search mode) from any record or record group even when I haven't modified a single field.

Anyone have any idea on what would cause these pop-ups to occur specifically?

I ask because on the opening one, it opens right away, and when I click "yes" it does nothing, then I just click "no" and it goes away.

Thanks for any help.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Record Modified Pop-Ups
Reply #1 - Oct 18th, 2018 at 3:04pm
Print Post Print Post  
Hello,

PopulateListElement() doesn't modify the record. You have some other piece of code that is changing that record upon entering it. It could be on the parent form or it could be on a subform, but a piece of code some place is modifying a record.

The message about automatically committing the record appears in 4 places in the source code. When you re-sort the resultset, when you re-sort the resultset by timestamp, when you toggle from form view to table view and when you run a report. In all 4 of those cases, it will only run if the record(or by extension subrecord) that you are on has been changed and not committed to the database. 

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: Record Modified Pop-Ups
Reply #2 - Oct 18th, 2018 at 4:00pm
Print Post Print Post  
So if a SubForm is modified it causes the record to be modified. If I used XResultSet commands to modify the SubForm, would it modify the record in some other way, so as not to receive the message?

I'm pretty sure the resultset is being re-sorted when the report runs but I'll have to look into that. If it is, is there any way to disable the notifications, like in the sesame.ini or something, for that scenario or is that not advisable?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Record Modified Pop-Ups
Reply #3 - Oct 18th, 2018 at 4:10pm
Print Post Print Post  
actiontech wrote on Oct 18th, 2018 at 4:00pm:
So if a SubForm is modified it causes the record to be modified. If I used XResultSet commands to modify the SubForm, would it modify the record in some other way, so as not to receive the message?


You should never ever ever ever ever ever ever use the XResultSet commands to edit a record that you have open on your screen. Why? Because when you step off that record by pressing F10, you're going to commit that record and overwrite the changes you made with XResultSet.

Quote:
I'm pretty sure the resultset is being re-sorted when the report runs but I'll have to look into that. If it is, is there any way to disable the notifications, like in the sesame.ini or something, for that scenario or is that not advisable?


There is no way to disable that message except maybe turning Warning Level to Off but that is not advisable at all. A better solution would be that if you must change the record as soon as the person browses to that record, to call FormCommit() to save the changes.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: Record Modified Pop-Ups
Reply #4 - Oct 18th, 2018 at 7:56pm
Print Post Print Post  
My only concern with calling FormCommit() is that it will cause the record to modify the RecordModifiedDate() and RecordModifiedTime() which I'm also trying to work with. But I could test it out and see. I could maybe even create my own RecordModified code based on some other conditions using the @DATE and @TIME commands, if that doesn't work. Thanks for the help.
  
Back to top
 
IP Logged