Note that:
Method avRestoreValue has UseAValueDefault, UseAValueUDefault and UseNValueDefault parameters that can be used to specify which default value should be used when a clipboard entry cannot be found.
This means that the previous example could be more easily coded like this:
Invoke #AvFrameworkManager.avRestoreValue WithID1(*Component) WithID2(NumberofCopies) ToNValue(#NumCopies) UseNValueDefault(42)
There is an additional clipboard parameter named ForLanguage that can be used when the thing being remembered is language dependent. Typically this is used like this:
Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(#HelloMessage.Name) FromAValue(#HelloMessage) FoLanguage(*Language)
This means that the clipboard maintains different #HelloMessage values for different languages.
There is an additional numeric parameter named Instance which allows you to keep many instances of a value on the clipboard. This effectively allows you to place lists of things onto the clipboard.
For example, imagine you had a list view containing employee numbers (#EmpNo) and salaries (#Salary) in your program. Then this code:
Change #Instance 0
SelectList #ListView Change #Instance '#Instance + 1' Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_EMPNO) FromAValue(#Empno) Instance(#Instance) Invoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_SALARY) FromNValue(#Salary) Instance(#Instance)EndselectInvoke #AvFrameworkManager.avSaveValue WithID1(*Component) WithID2(EMPLOYEE_LIST_COUNT) FromNValue(#Instance)
Creates a list (and count) of employee numbers and salaries on the clipboard