Micro Focus QTP (UFT) Forums

Full Version: How do I call a functionname thats stored in a variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi ,

I have fetched the function name from the excel sheet which is stored in a variable.

I want to call the function thats in the variable...Do you know a way on How to achieve that?
Ex:-

Code:
value=2
GetDataTableValue = DataTable.Value"FunctionName", "ExlFunctionList")    
CurrentFunctionName =GetDataTableValue

Call CurrentFunctionName&"(" &value&")"

Is there any other way that I can achieve this ?

thanks,
Surya
Hi Surya,

Try this,

Code:
Execute CurrentFunctionName&"(value)"
OR
Code:
EVal (CurrentFunctionName&"(value)")

Difference between both, EVal returns value while Execute doesn't.

Regards,
Saleel