deletedictionaryvalue(
DICTIONARY
,
KEY
)

The deletedictionaryvalue( function deletes one or more key/value pairs from a dictionary (see Data Dictionaries).


Parameters

This function has two parameters:

dictionary – is the name of the field or variable that contains the dictionary (must contain binary data).

key – is the name of the key/value pair to delete. If you need to delete more than one key/value pair, more than one key parameter can be used. If there is only one, empty ("") parameter, all key/value pairs will be removed.


Description

The deletedictionaryvalue( function takes one or more key names and deletes the associated key/value pairs from the dictionary collection. For example, suppose you created a dictionary and stored it in a variable named mailto.

fileglobal mailto
mailto=initializedictionary("Address","3987 Olive","City","Tustin","State","CA","Zip","92841")

Later, you could use the deletedictionaryvalue( function to delete the Address and Zip values:

mailto=deletedictionaryvalue(mailto,"Address","Zip")

If you leave out the key name, all of the key/value pairs will be deleted:

mailto=deletedictionaryvalue(mailto,"")

However, there is an easier way to do this:

mailto=""

Advanced Note: "" is the only text value that can be used as a dictionary – it represents an empty dictionary. Attempting to use a non-zero length text object as a dictionary will result in an error.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now available as a function. Also now allows multiple key/value pairs to be deleted by one function.