<?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: Open another form using if else condition</title><link>https://www.infopathdev.com:443/forums/thread/14815.aspx</link><pubDate>Tue, 03 Oct 2006 16:32:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14815</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14815.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14815</wfw:commentRss><description>By looking at the code, this looks like it should work.  To help you debug, you might want put in a few popup dialogs that show you the values that you are working with. Another consideration would be making sure the case sensitivity is not throwing you off.  Also, you are not using the sourceBusinessCard variable anywhere, try this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var sourceBusinessCard = XDocument.DOM.selectSingleNode("//my:myFields/my:business_card_order").text;&lt;br /&gt;&lt;br /&gt;XDocument.UI.Alert( sourceBusinessCard );&lt;br /&gt;&lt;br /&gt;if (sourceBusinessCard.ToUpper() == "YES")&lt;br /&gt;{&lt;br /&gt;//open business card order form template&lt;br /&gt;var xBusCard = Application.XDocuments.NewFromSolution("\\\\everest\\public\\forms\\Infopath Business Card Order Form.xsn");&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;email the new hire form bunch of codes&lt;br /&gt;}</description></item><item><title>Re: Open another form using if else condition</title><link>https://www.infopathdev.com:443/forums/thread/14814.aspx</link><pubDate>Wed, 27 Sep 2006 00:43:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14814</guid><dc:creator>cornik99</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14814.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14814</wfw:commentRss><description>Sorry, the field is not boolean but string.</description></item><item><title>Open another form using if else condition</title><link>https://www.infopathdev.com:443/forums/thread/12953.aspx</link><pubDate>Tue, 26 Sep 2006 23:55:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12953</guid><dc:creator>cornik99</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12953.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12953</wfw:commentRss><description>&lt;br /&gt;&lt;br /&gt;Can someone see if you can duplicate my problem by creating &lt;br /&gt;two separate forms? Add business_card_order (boolean) field to Form1. Next, create a button on form1 and type your if and else statement to open form2 if the &lt;br /&gt;value of business_card_order is equal to "Yes" else do something else. &lt;br /&gt;&lt;br /&gt;The code below runs without error but it won't open the business card form when the business_card_order field value was set to either yes or no.  I hope this is not a bug. &lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;var sourceBusinessCard = XDocument.DOM.selectSingleNode("//my:myFields/my:business_card_order").text;&lt;br /&gt; &lt;br /&gt;if (XDocument.DOM.selectSingleNode("//my:myFields/my:business_card_order").text == "Yes")&lt;br /&gt;{&lt;br /&gt;//open business card order form template&lt;br /&gt;var xBusCard = Application.XDocuments.NewFromSolution("\\\\everest\\public\\forms\\Infopath Business Card Order Form.xsn");&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;email the new hire form bunch of codes &lt;br /&gt;}&lt;br /&gt;</description></item></channel></rss>