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

Home

 
4D v20 R7
OBJECT SET VALUE

OBJECT SET VALUE 


 

OBJECT SET VALUE ( objectName ; value ) 
Parameter Type   Description
objectName  Text in Object name
value  Mixed in New value for the form object's data source

Example 1   

OBJECT SET VALUE sets the value of the current data source for the form object(s) designated by the objectName parameter.

In the objectName parameter, pass the name of a form object (a string). You can set the value of multiple form objects by using the wildcard character (“@”).

The value parameter allows you pass a new value (any type) for the form object's data source.

Note: If the data source is a non-assignable expression, OBJECT SET VALUE does nothing. For more information, see assignable vs non-assignable expressions.

You want to get the data source value for a form object, get its name, and set a new value:

 C_VARIANT($value)
 
 $value:=OBJECT Get value(OBJECT Get name(Object current)) //verify the set value
 
 OBJECT SET VALUE(OBJECT Get name(Object current);$value+10) //find the form object name and set the value to 50

 



See also 

OBJECT Get value

 
PROPERTIES 

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

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)