Aller au contenu principal
Version: Next

VP IMPORT FROM BLOB

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

ParamètresTypeDescription
vpAreaNameText->Nom d'objet formulaire zone 4D View Pro
vpBlob4D.Blob->Blob contenant un document 4D View Pro
paramObjObject->Options d'import

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:

PropriétéTypeDescription
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.
fullRecalcBooleanIndique si le calcul doit être effectué après le chargement des données json, la valeur par défaut est faux.
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. Other sheets will be loaded only when they are be used.
2: incremental open mode.

Les paramètres suivants peuvent être utilisés dans la méthode de rappel :

ParamètresTypeDescription
param1textNom de l'objet 4D View Pro
param24D.BlobLe blob importé
param3objectA reference to the command's paramObj parameter
param4objectObjet retourné par la méthode avec un message de statut
.successbooleanVrai si l'import est réussi, Faux sinon.
.errorCodeintegerCode d'erreur.
.errorMessagetextMessage d'erreur.

Exemple

Vous souhaitez importer dans la "ViewProArea" un document 4D View Pro précédemment enregistré en tant que Blob dans la première entité de la dataclass Table.

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

Voir également

VP EXPORT TO BLOB