Normal Topic forcing user confirmation  before saving chan (Read 746 times)
airjordan
Member
*
Offline



Posts: 13
Joined: Sep 11th, 2009
forcing user confirmation  before saving chan
Dec 5th, 2010 at 10:56pm
Print Post Print Post  
hi,

I was wondering if anyone could point me in the direction of how I could program Sesame to force user confirmation by way of a pop-up box or similar before saving any changes to records.

We are having problems with users scrolling through records using F10 and not realising they have updated/changed details in a record and saving the wrong information.

Is there any programming that can prompt a user if they are sure they want to update the record when they hit F10?

  
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: forcing user confirmation  before saving chan
Reply #1 - Dec 6th, 2010 at 2:56pm
Print Post Print Post  
Hello,

I believe the following is what you are looking for.

In your on Form Entry programming place

Code
Select All
	If @Update Then
	{
		NotifyForm(1)
	} 



Then in your on Form Exit programming place

Code
Select All
Var vI as Int

	If @Update Then
	{
		If @Modified Then
		{
			If @AskUser("This Record has been changed.", "", "Do you want to save the changes?")
			{
				NotifyForm(0)
			}
			Else
			{
				vI = @SelectTreeItem("Search Update Menu!Edit Commands!Undo Current Form (Shift-F7)")
				NotifyForm(0)
			}
		}
		Else
		{
			NotifyForm(0)
		}
	} 



This will prompt the user if the form has changed before saving it. If the user wishes to not save the changes they are undone and the record is reverted back to what it was when the user first entered it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: forcing user confirmation  before saving chan
Reply #2 - Dec 6th, 2010 at 3:20pm
Print Post Print Post  
You might also want to look at your form programming to make it so that people can safely browse through records without unintentionally changing data.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
airjordan
Member
*
Offline



Posts: 13
Joined: Sep 11th, 2009
Re: forcing user confirmation  before saving chan
Reply #3 - Dec 7th, 2010 at 12:05am
Print Post Print Post  
thanks Ray.. i will give it a try.

Hammer - what sort of form programming can I use for that? do you mean something like a command button to browse to next record rather than users hitting F10 and unintentionally committing changes?

Cheers

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: forcing user confirmation  before saving chan
Reply #4 - Dec 7th, 2010 at 3:39am
Print Post Print Post  
airjordan wrote on Dec 7th, 2010 at 12:05am:
Hammer - what sort of form programming can I use for that? do you mean something like a command button to browse to next record rather than users hitting F10 and unintentionally committing changes?

No, I mean changing your programming so that users are less likely to make changes without knowing it simply by trying to browse through records in the first place.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged