<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx</link><description>One of the great and power features InfoPath provides is the xdExtension prefix. This feature allows your form to call into your code from areas like conditional formatting. It provides you with greater flexibility in determining the validity of a condition</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#25994</link><pubDate>Mon, 28 Jan 2008 23:07:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25994</guid><dc:creator>infopathcole</dc:creator><description>&lt;p&gt;Solved my problem.&lt;/p&gt;
&lt;p&gt;In manifest.xsf don't do this:&lt;/p&gt;
&lt;p&gt;xdExtension:getGradingPolicy(../my:SquareFootage, ../my:TotalInfraction)&lt;/p&gt;
&lt;p&gt;Do this:&lt;/p&gt;
&lt;p&gt;xdExtension:getGradingPolicy(number(../my:SquareFootage), number(../my:TotalInfraction))&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=25994" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#25983</link><pubDate>Mon, 28 Jan 2008 20:03:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25983</guid><dc:creator>infopathcole</dc:creator><description>&lt;p&gt;I have a problem with passing parameters to the function. Apparently the parameter being passed to the function is type &amp;quot;system._object&amp;quot;. I have been scratching my head with this and going no where. Here's a sample code:&lt;/p&gt;
&lt;p&gt;function getGradingPolicy(sqrFoot, TotInfraction)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (sqrFoot &amp;gt; 10)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;BIG&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;small&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;I'm calling the script from infopath rule &amp;nbsp;like this:&lt;/p&gt;
&lt;p&gt;xdExtension:getGrading(sqrfoot, totinfraction)&lt;/p&gt;
&lt;p&gt;How can I cast a type &amp;quot;system._object&amp;quot; into integer?&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=25983" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#25911</link><pubDate>Thu, 24 Jan 2008 20:53:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25911</guid><dc:creator>jlricher</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a IP2007 browser-enabled form, and i'm trying to use the xdExtension to run some code. I've check the manifest.xsf and the xdExtension namespace is there. At the update of the form, on the form server, I have an error about xdExtension namespace within the manifest.xsf. Do you know what can possibly cause this ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=25911" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#25750</link><pubDate>Sat, 19 Jan 2008 00:09:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25750</guid><dc:creator>Greg Collins</dc:creator><description>&lt;p&gt;jatuphum,&lt;/p&gt;
&lt;p&gt;The XSN is a collection of files, which includes the .xsf file. You must expand it (File menu of the designer) to get to the files it contains.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=25750" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#23512</link><pubDate>Mon, 08 Oct 2007 11:09:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23512</guid><dc:creator>jatuphum</dc:creator><description>&lt;p&gt;Expansion for above comment,&lt;/p&gt;
&lt;p&gt;I forgot to tell you about my managed code I use VSTA to write code for &amp;quot;my template.xsn&amp;quot;. And function &amp;quot;TestAlert&amp;quot; is in it.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=23512" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#23511</link><pubDate>Mon, 08 Oct 2007 10:50:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:23511</guid><dc:creator>jatuphum</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I use Infopath 2007. I designed my template such as &amp;quot;my template.xsn&amp;quot; but It doesn't &amp;quot;manifest.xsf&amp;quot;&lt;/p&gt;
&lt;p&gt;And I do your solution with &amp;quot;my template.xsn&amp;quot; but not &amp;quot;manifest.xsf&amp;quot;&lt;/p&gt;
&lt;p&gt;When I preview &amp;quot;my template.xsn&amp;quot;, error this occurs&lt;/p&gt;
&lt;p&gt;----------------&lt;/p&gt;
&lt;p&gt;mscorlib&lt;/p&gt;
&lt;p&gt;That assembly does not allow partially trusted callers.&lt;/p&gt;
&lt;p&gt;Error occurred during a call to property or method 'TestAlert'.&lt;/p&gt;
&lt;p&gt;------------------------&lt;/p&gt;
&lt;p&gt;How can I fix it?, and how about different between &amp;quot;.xsn&amp;quot; and &amp;quot;.xsf&amp;quot;?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=23511" width="1" height="1"&gt;</description></item><item><title>re: Use Code to Determine a Rule Condition</title><link>https://www.infopathdev.com:443/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx#19653</link><pubDate>Tue, 08 May 2007 01:27:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19653</guid><dc:creator>Terry G Phillips</dc:creator><description>&lt;p&gt;IP2007 - I'm having a failure in my function while trying to call a DataConnection.Execute(). Is it even possible to do this?&lt;/p&gt;
&lt;img src="https://www.infopathdev.com:443/aggbug.aspx?PostID=19653" width="1" height="1"&gt;</description></item></channel></rss>