4D View v14

PV UPDATE DYNAMIC AREA

Home

 
4D View v14
PV UPDATE DYNAMIC AREA

PV UPDATE DYNAMIC AREA 


 

PV UPDATE DYNAMIC AREA ( area ) 
Parameter Type   Description
area  Longint in 4D View area

The PV UPDATE DYNAMIC AREA command causes the synchronization of the data present in the 4D View area and those of the 4D database.

This command is useful within the context of callback methods used in dynamic areas only. In fact, when a callback method causes the modification of the current selection of 4D, the 4D View area is only updated at the end of execution of the entire method. However, if in this case commands such as PV GOTO CELL are used in the callback method, the result obtained could be incorrect due to the temporary lag between 4D data and those of 4D View. To avoid this risk, it is necessary to call the PV UPDATE DYNAMIC AREA command during the callback method in order for the data of the 4D View area to immediately reflect any modifications carried out on those of 4D.

PV UPDATE DYNAMIC AREA causes the update of the 4D View area if the 4D selection has undergone at least one of the following modifications:

  • Modification of the current selection within the context of linked fields,
  • Modification of the size of linked arrays,
  • Modification of the data of linked fields or arrays.

Example  

This example continues that of the PV ADD DYNAMIC FIELDS command (enabling the linking of the 4D selection to the 4D View area). We install an on "right click" event method used to create a record in the 4D selection and to position itself on this record in the 4D View area.

 PV ON EVENT(area;pv on right clicked;"CallbackMethod")

The code of the CallbackMethod project method is as follows:

 C_BOOLEAN($0)
 C_LONGINT($1;$2;$3;$4;$5;$6)
 
 $0:=True `Blocks event
 CREATE RECORD([Contacts]) `New record
 SAVE RECORD([Contacts]) `Saving of created record
 ALL RECORDS([Contacts])
 
  `Updating of the 4D View selection in relation to that of 4D
 PV UPDATE DYNAMIC AREA(area)
 
  `Selection of new record
 PV GOTO CELL(area;1;Records in selection([Contacts]))

 
PROPERTIES 

Product: 4D View
Theme: PV Cell value
Number: 15799

 
HISTORY 

Created: 4D View 6.8.1

 
SEE ALSO 

PV ADD DYNAMIC ARRAYS
PV ADD DYNAMIC FIELDS
PV CLEAR DYNAMIC COLUMNS

 
ARTICLE USAGE

4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)