Highlighted
sarvan
New Member.
838 views

execute an user defined function from another script

Jump to solution

Hi,

I have created two scripts - Script A and Script B.

Script A has 2 user defined functions:

UDF1(str_user_name, str_user_reference)  

UDF2(str_phone, str_email)

Script B has 2 user defined functions:

UDF3(str_first_name_, str_last_name)

UDF4(quanity, amount)

Now, I want to call UDF4 from Script A. I know Workbench.RunScript method that runs the whole script. But, I want to call a specific procedure / function of Script B along with its parameters from Script A?

0 Likes
1 Solution

Accepted Solutions
AndySchott Absent Member.
Absent Member.

RE: execute an user defined function from another script

Jump to solution

If you add a reference to ScriptB from ScriptA, you will be able to call any public classes and methods in ScriptB from ScriptA. The help topic "Referencing a Script from within a Script" can give you more information about referencing scripts.

Andy

0 Likes
1 Reply
AndySchott Absent Member.
Absent Member.

RE: execute an user defined function from another script

Jump to solution

If you add a reference to ScriptB from ScriptA, you will be able to call any public classes and methods in ScriptB from ScriptA. The help topic "Referencing a Script from within a Script" can give you more information about referencing scripts.

Andy

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.