Skip to main content
Version: 20 R5 BETA

VP Get data context

History
ReleaseChanges
19 R5Added

VP Get data context ( vpAreaName : Text {; sheet : Integer } ) : Object
VP Get data context ( vpAreaName : Text {; sheet : Integer } ) : Collection

ParameterTypeDescription
vpAreaNameObject->4D View Pro area form object name
sheetInteger->Index of the sheet to get the data context from
ResultObject | Collection<-Data context

Description

The VP Get data context command returns the current data context of a worksheet. The returned context includes any modifications made to the contents of the data context.

In sheet, pass the index of the sheet to get the data context from. If no index is passed, the command returns the data context of the current worksheet. If there is no context for the worksheet, the command returns Null.

The function returns an object or a collection depending on the type of data context set with VP SET DATA CONTEXT.

Example

To get the data context bound to the following cells:

var $dataContext : Object

$dataContext:=VP Get data context("ViewProArea") // {firstName:Freehafer,lastName:Nancy}

See also

VP SET DATA CONTEXT
VP Get binding path
VP SET BINDING PATH