Lantica Software Support Center
Lantica Software Home Page
Order Sesame Getting Started Support Center Contact Us Company Downloads Q&A ™  
Search

Knowledgebase Home

Prompt users for confirmation before saving changed records

Users scrolling through existing records may unintentionally and unknowingly change the details in a record, resulting in inaccurate data. The following program will prompt the user to confirm the changes before saving. If the user does not wish to save the changes, they are undone and the record is reverted to what it was when the user first entered it.

This is only one way to ensure that users can safely browse through records. Sesame provides many other options, such as adjusting an Element's visibility, attaching security to a database, as well as various form programming, to name a few.
In your On Form Entry programming place:
If @Update then
{
	NotifyForm(1)
}

Then, in your On Form Exit programming place:
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)
		}
	} 

Properties ID: 000202   Views: 1029   Updated: 13 years ago
Filed under:
Programming
Sesame Administration

Copyright Lantica Software, 2003-2025 All rights reserved