How can I delete the values saved with the VF_SAVEAVALUE BIF during a session?
|Date:||7 July 2004|
|Product/Release:||Visual LANSA Framework|
|Abstract:||Making sure the saved values are deleted during a session in the Visual LANSA Framework|
|Submitted By:||LANSA Technical Support|
|Last Review:||November 2010|
In order to delete the values saved with the VF_SAVEAVALUE BIF during a session you should normally treat something on the virtual clipboard like a property in a VL object.
Imagine you had a "property" on the clipboard called "NumberofCopies" which had a default value of 6. When you get its value specify the default value (which saves you having to write code to handle it not being found):
INVOKE Method(#AvFrameworkManager.avRestoreValue) WITHID1(NumberofCopies) TONVALUE(#Copies) UseNValueDefault(6)
To logically "delete" a value simply reset its value back to the default (just like you would a property in an object):
Invoke #AvFrameworkManager.avSaveValue WithID1(NumberofCopies) FromNValue(6)
Both the Windows and Web versions support default values like this, so you can use the same approach in both.
Similarly many objects may have a default value of zero or blanks, in which case the same approach should be adopted.