Este es el sitio web histórico de la documentación de 4D. La documentación se está trasladando progresivamente a developer.4d.com

Inicio

 
4D v20 R7
OBJECT Get subform container value

OBJECT Get subform container value 


 

OBJECT Get subform container value -> Resultado 
Parámetro Tipo   Descripción
Resultado  Mixed in Current value of the subform container data source

The OBJECT Get subform container value command returns the current value of the data source bound with the subform container displayed in the parent form.

This command can only be used in the context of a form used as a subform. In any other context, it returns Undefined.

  • If the data source is an expression, the command returns the current value of the expression, evaluated since the last form event cycle. 
  • If the data source is an array, the command returns the array index (integer).

For more information on bound variables and form/subform interaction, see Managing the bound variable on developer.4d.com.

Ejemplo  

Given a main form and a subform that both have an Input form object: 

Inside the main form, the Input object and the Subform object are bound to the Form.numeric expression of type Numeric.

The main form's Input object and the subform's Input object both have the On Data Change property set via the Property list.

The subform's Form Method contains the following code: 

 If(Form event code=On bound variable change)
    Form.displayNumeric:=OBJECT Get subform container value
 End if

 

And inside the subform, the Input text's object method contains the following code: 

 

As a result, at runtime, updating the value of the main form's Input object also updates the value of the subform's Input object, and vice versa.



Ver también 

Form
OBJECT Get pointer
OBJECT SET SUBFORM CONTAINER VALUE

 
PROPIEDADES 

Producto: 4D
Tema: Objetos (Formularios)
Número 1785

 
CONTENIDO DE LA PÁGINA 
 
HISTORIA 

Creado por: 4D v19 R5

 
ARTICLE USAGE

Manual de lenguaje 4D ( 4D v20 R7)