Skip to main content
Version: Next

VP IMPORT FROM BLOB

VP IMPORT FROM BLOB ( vpAreaName : Text ; vpBlob : 4D.blob { ; paramObj : Object} )

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
vpBlob4D.Blob->Blob containing a 4D View Pro document
paramObjObject->Import options

Description

The VP IMPORT FROM BLOB command imports the vpBlob in the 4D View Pro area vpAreaName and replaces its contents. vpBlob must contain a 4D View Pro document previously saved as Blob either by using the VP EXPORT TO BLOB command or via the 4D View Pro interface.

In paramObj, you can pass several properties:

PropertyTypeDescription
formula4D.FunctionCallback method to be launched when the import has completed. See Passing a callback method (formula).
calcOnDemandBooleanWhether to calculate formulas only when they are demanded, default=false.
dynamicReferencesBooleanWhether to calculate functions with dynamic reference, default=true.
fullRecalcBooleanWhether to calculate after loading the json data, false by default.
includeFormulasBooleanWhether to include the formula when loading, default=true.
includeStylesBooleanWhether to include the style when loading, default=true.
includeUnusedStylesBooleanWhether to include the unused name style when converting excel xml to the json, default=true.
openModeIntegercan be:
0: normal open mode, without lazy and incremental. When opening document, UI and UI event could be refreshed and responsive at specific time points.
1: lazy open mode. When opening document, only the active sheet will be loaded directly. Other sheets will be loaded only when they are be used.
2: incremental open mode. When opening document, UI and UI event could be refreshed and responsive directly.

The following parameters can be used in the callback method:

ParameterTypeDescription
param1textThe name of the 4D View Pro area object
param24D.BlobThe imported blob
param3objectA reference to the command's paramObj parameter
param4objectAn object returned by the method with a status message
.successbooleanTrue if import with success, False otherwise.
.errorCodeintegerError code.
.errorMessagetextError message.

Example

You want to import into the "ViewProArea" a 4D View Pro document previously saved as Blob in the first entity of the Table dataclass.

var $myBlobDocument : 4D.Blob :=ds.Table.all().first().blob
VP IMPORT FROM BLOB("ViewProArea"; $myBlobDocument)

See also

VP EXPORT TO BLOB