Documentation

db

Syntax: %db(rec,key)

Returns the value of the key property of the given record variable. A shortcut for this function is @rec.key which also returns the key value in the record variable rec. To retrieve a field from the current database record (%rec), you can either use %db(%rec,key), or %rec.key, or the shortcut &key where & is the current Database Variable set in the Special Characters.

You can also use this with normal database variables. In this case, replace "rec" with "@varname".

Examples:

#ADDKEY MyChar Name Zugg
#SHOW %db(@MyChar,Name)

displays: Zugg

This is the same as doing #SHOW @MyChar.Name

Add comment

Login or register to post comments