This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
OBJECT Get action

OBJECT Get action 


 

OBJECT Get action ( {* ;} object ) -> Function result 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a field or variable
object  Form object in Object name (if * is specified) or
Field or variable (if * is omitted)
Function result  Text in Associated standard action name and (if any) parameter string

The OBJECT Get action command returns the name and (if any) parameter of the standard action associated with the object(s) designated by the object and * parameters.

Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a field or variable. In this case, you pass a field or variable reference instead of a string (field or variable object only).

You can set a standard action for an object in the Form editor using the Property List, or using the OBJECT SET ACTION command. OBJECT Get action returns a string containing the name of the standard action associated with the object (as well as its parameter, if any).

For a comprehensive list of standard actions, please refer to the Standard actions section in the Design Reference manual. 

Example  

You want to associate the "Cancel" action with all the objects in the form that do not already have any associated action:

 ARRAY TEXT($arrObjects;0)
 
 FORM GET OBJECTS($arrObjects)
 For($i;1;Size of array($arrObjects))
    If(OBJECT Get action(*;$arrObjects{$i})=ak none)
       OBJECT SET ACTION(*;$arrObjects{$i};ak cancel)
    End if
 End for



See also 

OBJECT SET ACTION

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1457

 
PAGE CONTENTS 
 
HISTORY 

Modified: 4D v16 R3

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)