<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: If/Else Conditional in Function</title><link>https://www.infopathdev.com:443/forums/thread/14614.aspx</link><pubDate>Fri, 02 Jun 2006 19:42:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14614</guid><dc:creator>andreas.vogel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14614.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14614</wfw:commentRss><description>Hi Shailaja,&lt;br /&gt;&lt;br /&gt;thank you for your reply.  I don't quite understand what you mean with the OR symbol.&lt;br /&gt;&lt;br /&gt;I'm looking for a default function which does something like this.&lt;br /&gt;&lt;br /&gt;if (&amp;lt;somedropdownField&amp;gt; = "Foo")&lt;br /&gt;      &amp;lt;someCalculatedField&amp;gt; = a*b*c&lt;br /&gt;elseif (&amp;lt;somedropdownField&amp;gt; = "Bar")&lt;br /&gt;      &amp;lt;someCalculatedField&amp;gt; = b*c&lt;br /&gt;else&lt;br /&gt;      &amp;lt;someCalculatedField&amp;gt; = 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The default value of &amp;lt;someCaluclatedField&amp;gt; should be set based on the drop down value selected of &amp;lt;somedropdownField&amp;gt;.  So that &amp;lt;someCalculatedField&amp;gt; automatically updates itself whenever any of the values in the eqution are changed.  &lt;br /&gt;Is there a way to access/set a fields - default value to an equation via code?&lt;br /&gt;&lt;br /&gt;Any thoughts?&lt;br /&gt;Thanks,&lt;br /&gt;-Andreas&lt;br /&gt;</description></item><item><title>Re: If/Else Conditional in Function</title><link>https://www.infopathdev.com:443/forums/thread/14613.aspx</link><pubDate>Fri, 02 Jun 2006 05:45:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14613</guid><dc:creator>shailaja</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14613.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14613</wfw:commentRss><description>Hello Andreas Welcome to Forums,&lt;br /&gt;      Yes you can have an if/else statement in Xpath by using an OR symbol “|”. You can do that by giving this “my: myFields\my:Field1 | my:myFields\my:Field2” in function you want.&lt;br /&gt;&lt;br /&gt;Hope this helps!</description></item><item><title>If/Else Conditional in Function</title><link>https://www.infopathdev.com:443/forums/thread/12884.aspx</link><pubDate>Thu, 01 Jun 2006 23:46:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12884</guid><dc:creator>andreas.vogel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12884.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12884</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;is it possible to have an if/else statement in the functions for a field?  In Xpath?  How would I go about doing this?&lt;br /&gt;&lt;br /&gt;I'm working on a costing sheet and a number of fields use different equations based on the value of a drop down.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;-Andreas</description></item></channel></rss>