Gets the open parameters. By calling this method in the OnInitialize event of a form, etc., you can get the open parameters specified by the caller's OpenForm method, etc.
When using the obtained open parameters, appropriate processing must be performed depending on the values passed by the caller.
Example 1) If the caller passes in a string or array, you may need to convert the data type accordingly.
Caller description:
::OpenForm("Form01","",c("Param1:ABC","Param2:123","Param3:T"));
Called form description:
var vParam1 = ::CStr(GetOpenParam("Param1")); //String
var vParam2 = ::CInt(GetOpenParam("Param2")); //Number
var vParam3 = ::CBool(GetOpenParam("Param3")); //Bool value
Example 2) If the caller passes a map value using the MAP route method, you can use it without being aware of the data type. You can also pass an array or object in the map value.
Caller description:
var vParam = ::MAP("Param1","ABC","Param2",123,"Param3",T,"Param4",c("AAA","BBB","CCC"));
::OpenForm("Form01","",vParam);
Called form description:
var vParam1 = GetOpenParam("Param1"); // String "ABC"
var vParam2 = GetOpenParam("Param2"); // Number 123
var vParam3 = GetOpenParam("Param3"); //Bool Value T
var vParam4 = GetOpenParam("Param4"); // Array c("AAA","BBB","CCC")
|