[ |../../index.htm#lansa/lansa050_2440.htm]
現在地: RAMP-TSガイド > スクリプト > 使用方法 > objGlobal

objGlobal 

objGlobalを使用して独自のプロパティを格納できます。
これは、1つのスクリプトから情報を格納し、その情報を後で別のスクリプトで使用する必要がある場合に役に立ちます。
その情報には、後のスクリプトで参照される必要のある、画面からのフィールド値などを使用できます。
また、スクリプトが通ってきたパスを特定することもできます。したがって、同じ画面が2つのパスから使用されている場合、そのスクリプトは自身が通ってきたパスを判別できます。

プロパティ

タイプ

説明

<<任意のプロパティ名>>

文字列

割り当て先の任意のプロパティ

 |
例 
ユーザーが通ってきたパスとユーザーが作業を行っているアイテムを保存します (画面1)。
/* Store the Item number that the user entered  - this field has to be defined on this form*/
objGlobal.utxtItemNumber = GETVALUE("utxtItemNumber");
/* Store the action that is being performed (so that shared screens can know whether its an add or a copy) */
objGlobal.uLastAction = "COPY";
Remember the path the user is on, and the item the user is working with (On Screen 4).
/* Get the action that is being performed */
if (objGlobal.uLastAction == "COPY")
\{
   ALERT_MESSAGE("Inventory item", objGlobal.utxtItemNumber, "was copied from " , objListManager.AKey1\[0\] );
\}
else
\{
   ALERT_MESSAGE("Inventory item was added.", objGlobal.utxtItemNumber , "has been saved.");
 
objGlobal は 5250 セッション内でグローバルであることに注意してください。各 5250 セッションには独自の objGlobal インスタンスがあります。
詳細については、「[<span style="color: #0000ee"><span style="text-decoration: underline; ">objGlobal オブジェクトの使用方法</span></span>|lansa050_2265.htm#_Ref137355632]」を参照してください。
[ !worddavaf485e25f57cd86bb5b0fc63f3f1b1cc.png|height=32,width=32! |../../index.htm#lansa/lansa050_2440.htm]