メインコンテンツまでスキップ
バージョン: 20 R9 BETA

VP IMPORT FROM OBJECT

履歴
リリース内容
20 R9Support of paramObj parameter

VP IMPORT FROM OBJECT ( vpAreaName : Text { ; viewPro : Object { ; paramObj : Object} } )

引数説明
vpAreaNameText->4D View Pro フォームオブジェクト名
viewProObject->4D View Pro オブジェクト
paramObjObject->(Optional) import options

説明

VP IMPORT FROM OBJECT コマンドは、vpAreaName で指定した 4D View Pro エリアに viewPro の 4D View Pro オブジェクトを読み込んで表示させます。 エリア内に挿入されていたデータがあれば、それらは読み込んだオブジェクトのデータで置換されます。

vpAreaName には、4D View Pro エリアの名前を渡します。 存在しない名前を渡した場合、エラーが返されます。

viewPro には有効な 4D View Pro オブジェクトを渡します。 このオブジェクトは手動で作成するほか、VP Export to object を使って取得することができます。 オブジェクトについての詳細は 4D View Pro オブジェクト を参照ください。

viewPro オブジェクトが無効な場合には、エラーが返されます。

In paramObj, you can pass the following property:

プロパティ説明
formula4D.Function(Optional) Callback function to be executed when the object is loaded and all 4D custom functions have responded. コールバックメソッド (フォーミュラ) の渡し方 を参照ください。

コールバックメソッドでは、以下のパラメーターを使用することができます:

引数説明
param1Text4D View Pro エリアのオブジェクト名
param2TextReserved for compatibility, this parameter is always empty
param3Objectコマンドの paramObj 引数への参照
param4Objectメソッドから返されるステータスメッセージを格納したオブジェクト
.successBooleanTrue if import was successful, False otherwise
.errorCodeIntegerエラーコード
.errorMessageTextエラーメッセージ

The callback function specified in the formula attribute is triggered after all 4D custom functions within the imported content have completed their calculations. This ensures that any dependent processes, such as document modifications or exports, are performed only after all formula-based computations are fully resolved.

例題

You want to import a spreadsheet that was previously saved in an object field, and trigger a callback function after all 4D custom functions have responded:

QUERY([VPWorkBooks];[VPWorkBooks]ID=10)

VP IMPORT FROM OBJECT("ViewProArea1"; [VPWorkBooks]SPBook; {formula: Formula(onImportComplete)})
// Method 'onImportComplete'
#DECLARE($name : Text; $path : Text; $paramObj : Object; $status : Object)
ALERT("The document has been imported, and all custom functions have finished processing.")

参照

VP Export to object