<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>String as Function — Sahi Pro Community</title>
        <link>https://community.sahipro.com/forums/</link>
        <pubDate>Fri, 13 Nov 2026 01:48:50 +0000</pubDate>
        <language>en</language>
            <description>String as Function — Sahi Pro Community</description>
    <atom:link href="https://community.sahipro.com/forums/discussions/tagged/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>How to convert String to a Function?</title>
        <link>https://community.sahipro.com/forums/discussion/1116/how-to-convert-string-to-a-function</link>
        <pubDate>Sat, 01 Aug 2009 04:12:46 +0000</pubDate>
        <category>Sahi - Open Source</category>
        <dc:creator>Admirer</dc:creator>
        <guid isPermaLink="false">1116@/forums/discussions</guid>
        <description><![CDATA[Hi,<br />
<br />
I am new for this Tool,  I am trying to build a framework for my application.  Could you please guide me...<br />
<br />
Excel file having following details:<br />
<br />
KeywordAction         PropertyNames      Values<br />
set                         xxxx                     Help<br />
setPwd                    xxxx                    xxxxxx<br />
clickButton               Submit<br />
...<br />
<br />
In the above details, &quot;KeywordAction&quot; column having UserDefined Functions.<br />
<br />
i am able to retrieve the functions, however i am facing a problem i.e.<br />
<br />
$fName = $rs[$i][&quot;KeywordAction&quot;]<br />
$fName($rs[$i][&quot;PropertyNames&quot;], $rs[$i][&quot;Values&quot;]);<br />
<br />
Here it's shown error message as &quot;JSERROR TypeError: $cm is not a function, it is string.&quot;<br />
<br />
But in QTP, I can do this as follows:<br />
<br />
fname = datatable.value(&quot;KeywordAction&quot;,&quot;SheetName&quot;)<br />
propName = datatable.value(&quot;PropertyNames&quot;,&quot;SheetName&quot;)<br />
vals = datatable.value(&quot;Values&quot;,&quot;SheetName&quot;)<br />
<br />
execute fname propName, vals<br />
<br />
if I write like this, QTP will identify &quot;fname&quot; as function and run.<br />
<br />
Is there any Functiion/Method in SAHI?<br />
<br />
<br />
Thanks in Advance.<br />
<br />
Thanks &amp; Regards,<br />
Tulasi.]]>
        </description>
    </item>
   </channel>
</rss>
