Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I call a functionname thats stored in a variable
#1
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run driver script to kick off scripts stored in QC? shipu 0 3,395 04-30-2014, 02:39 AM
Last Post: shipu
  executing stored procedure via QTP smita godbole 0 5,262 05-21-2012, 10:21 PM
Last Post: smita godbole
  "How to convert StringName to FunctionName" suresz449 0 2,286 08-30-2011, 04:01 PM
Last Post: suresz449
  How to test custom built reports, stored procedures using QTP azar80 3 5,050 01-12-2010, 10:19 AM
Last Post: Saket
  Can QTP call another program, query, or stored procedure salmankhan20039 1 2,826 07-01-2008, 11:17 AM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)