Skip to main content
Version: 20 R6

VP Get data context

History
ReleaseChanges
19 R5Added

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

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
sheetInteger->Index of the sheet to get the data context from
ResultVariant<-Data context. Object or Collection

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