The renamedictionarykey( function changes the key (name) of one or more values in a dictionary (see Data Dictionaries).


This function has three parameters:

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

key – name of an entry (this must be a text value). You can have more than one key parameter, as long as each key is accompanied by a new key name (see below).

newkey – is the new name of the entry.


The renamedictionarykey( function takes an existing collection of values (dictionary) and changes the name of one or more key/value pairs. This example creates a new dictionary collection containing a US mailing address and stores it in a variable named mailto.

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

Later you could use the renamedictionarykey( function to rename one or more of the values in the dictionary. (In this example the modified dictionary is being stored right back into the mailto variable, but it could be stored in a different field or variable.)

mailto=renamedictionarykey(mailto,"Address","Street","Zip","Postal Code")

You can see the changed values by using the dumpdictionaryquoted( function.


Here is the result:

Street="3987 Olive"
Postal Code="92841"

Error Messages

renamedictionarykey( function is missing a value parameter. – This function requires an odd number of parameters. If an even number of parameters is supplied, this error will occur.

See Also


10.0UpdatedCarried over from Panorama 6.0, but now allows more than one key/value pair to be renamed at a time. This operation is now available as a function that can be used a formula -- it was previously only available as the changedictionaryname statement (which still works for compatibility with older databases).