KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Bind Contents to Sheet Cells with VP Set Binding Path
PRODUCT: 4D | VERSION: 19 R 5 | PLATFORM: Mac & Win
Published On: July 3, 2023

As of 4D v19 R5, use the new commands VP Set Data Context, and VP Set Binding Path, to create data contexts and bind their contents to sheet cells.

Example:

var $p : Object

$p:=New object
$p.firstName:="Jane"
$p.lastName:="Doe"
$p.age:=50

VP SET DATA CONTEXT("ViewProArea"; $p)

VP SET BINDING PATH(VP Cell("ViewProArea"; 0; 0); "firstName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 1; 0); "lastName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 2; 0); "age")