<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: The expression is not a node-set - need help with a condition in default value of a textbox</title><link>https://www.infopathdev.com:443/forums/thread/100648.aspx</link><pubDate>Fri, 02 Jan 2015 22:53:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100648</guid><dc:creator>Doreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100648.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100648</wfw:commentRss><description>Never mind.&amp;nbsp; I found another way to approach this.&amp;nbsp; I am setting the value when submit button is clicked.&amp;nbsp; It&amp;#39;s not as pretty, but it works.</description></item><item><title>The expression is not a node-set - need help with a condition in default value of a textbox</title><link>https://www.infopathdev.com:443/forums/thread/100645.aspx</link><pubDate>Fri, 02 Jan 2015 20:38:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:100645</guid><dc:creator>Doreen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/100645.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=100645</wfw:commentRss><description>&lt;p&gt;I am following this tutorial to include a condition in a default value of a textbox: &amp;nbsp;&lt;a href="http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;http://blogs.msdn.com/b/infopath/archive/2006/11/27/conditional-default-values.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In a nutshell [if a date is greater than 12/31/14, default value shall be (textbox1A / textbox2A), else (textbox1 / textbox2)], translated to actual field names in my form&amp;nbsp;then my&amp;nbsp;default value for&amp;nbsp;&amp;nbsp;&lt;strong&gt;AverageScore3&lt;/strong&gt; &amp;nbsp;is entered as such: &lt;/p&gt;&lt;p&gt;(SumRatings3 / NumChecked3 | SumRatings3A / NumChecked3A) [(DueDate &amp;gt; dateCompare) + 1] &lt;/p&gt;&lt;p&gt;translates to xpath:&lt;/p&gt;&lt;p&gt;(./my:Safety_3/my:group3/my:SumRatings3A / ./my:Safety_3/my:group3/my:NumChecked3A | ./my:Safety_3/my:group3/my:SumRatings3 / ./my:Safety_3/my:group3/my:NumChecked3)[( ./my:EmployeeHeaderSection/my:DueDate &amp;gt; ./my:Debug/my:dateCompare) + 1]&lt;/p&gt;&lt;p&gt;Yet I&amp;nbsp;am receiving this error message with my expression in the default value field: &lt;/p&gt;&lt;p&gt;&lt;em&gt;The expression is not a node-set.&lt;br /&gt;--&amp;gt;(./my:Safety_3/my:group3/my:SumRatings3A div ./my:Safety_3/my:group3/my:NumChecked3A | ./my:Safety_3/my:group3/my:SumRatings3 div ./my:Safety_3/my:group3/my:NumChecked3)&amp;lt;--[( ./my:EmployeeHeaderSection/my:DueDate &amp;gt; ./my:Debug/my:dateCompare) + 1]&lt;/em&gt;&lt;/p&gt;&lt;p&gt;I cannot use code behind to accomplish this because the form uses qRules and DBXL.&amp;nbsp; I also cannot use Rules because I am modifying&amp;nbsp;a form that&amp;nbsp;needs the formula to remain intact for existing forms.&amp;nbsp; The approach I am taking then is to have a default value with a condition so the old formula works for existing forms, and the new formula works with new forms. Maybe there&amp;#39;s a better way?&lt;/p&gt;&lt;p&gt;The&amp;nbsp;Copy XPath for the&amp;nbsp;fields in the formula is:&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;DueDate = /my:myFields/my:EmployeeHeaderSection/my:DueDate&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;dateCompare = /my:myFields/my:Debug/my:dateCompare&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;AverageScore3 = /my:myFields/my:Safety_3/my:AverageScore3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;NumChecked3 = /my:myFields/my:Safety_3/my:group3/my:NumChecked3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;SumRatings3 = /my:myFields/my:Safety_3/my:group3/my:SumRatings3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;NumChecked3A = /my:myFields/my:Safety_3/my:group3/my:NumChecked3A&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;span style="color:black;font-size:10pt;mso-themecolor:text1;"&gt;SumRatings3A = /my:myFields/my:Safety_3/my:group3/my:SumRatings3A&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;

Question: the first part&amp;nbsp;of my expression is not a node set, but which node?&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="3" face="Times New Roman"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>