Este é o site histórico da documentação 4D. As documentações estão sendo movidas progressivamente para developer.4d.com

Página Inicial

 
4D v20.6
OBJECT Get subform container value

OBJECT Get subform container value 


 

OBJECT Get subform container value -> Resultado 
Parâmetro Tipo   Descrição
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.

Exemplo  

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 também 

Form
OBJECT Get pointer
OBJECT SET SUBFORM CONTAINER VALUE

 
PROPRIEDADES 

Produto: 4D
Tema: Objetos (Formulários)
Número 1785

 
CONTEÚDO DA PÁGINA 
 
HISTÓRIA 

Criado por: 4D v19 R5

 
ARTICLE USAGE

Manual de linguagem 4D ( 4D v20)
Manual de linguagem 4D ( 4D v20.1)
Manual de linguagem 4D ( 4D v20.2)
Manual de linguagem 4D ( 4D v20.3)
Manual de linguagem 4D ( 4D v20.4)
Manual de linguagem 4D ( 4D v20.5)
Manual de linguagem 4D ( 4D v20.6)