The objectaction statement allows a procedure to communicate with an object on the current form.


This statement has three parameters:

object – specifies the target object. This parameter may be either the name of the object, or the ID of the object.

command – is an instruction that will be sent to the target object. Different types of objects understand different types of commands.

parameter – Depending on the command, you may need additional parameters. For example, the Text Editor’s "InsertText" command requires one additional parameter which specifies the text to be inserted. Parameters may also receive values from the object. For example the Text Editor’s “GetSelection” command has two parameters: the starting and ending points of the selected text. If a parameter is used to receive a value from the object, that parameter must be a single field or variable with no operators (for example myValue, not myValue+yourValue or strip(myValue)).


This statement allows a procedure to communicate with an object on the current form. You specify what object you want to communicate with by its name or ID. Many types of objects have one or more commands that they understand. For example, the Text Editor Object has commands for selecting text, locating text, modifying text, etc.

This example inserts the current date and time into whatever object is currently being edited. The first few lines of the procedure check to make sure that there actually is an active object (i.e. something is really being edited at this time).

local EditingObject
if EditingObject <> ""
    objectaction EditingObject,"InsertText",
        datepattern( today(),"mm/dd/yy")+"@"+
        timepattern( now(),"hh:mm am/pm")

See Also


10.0UpdatedCarried over from Panorama 6.0, but has been renamed (this was formuerly called the superobject statement). Also, the exact options for different kinds of statements are different. This command now handles objects with duplicate names differently than in Panorama 6.0 and earlier -- now the communication will only be with the first object with the duplicate name.