<?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: qrules Date diff - change xpath to a field value which can change.</title><link>https://www.infopathdev.com:443/forums/thread/91599.aspx</link><pubDate>Wed, 24 Jul 2013 14:55:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91599</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91599.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=91599</wfw:commentRss><description>&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Hi Bill,&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3" face="Calibri"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
I’ve had a look at your form and the Excel file you provided us, and I believe I have a DateDiff
formula that will work in your case:&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3" face="Calibri"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt 1in;" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;span style="font-family:Consolas;"&gt;concat(&amp;quot;DateDiff /date1=&amp;quot;, my:EndDate, &amp;quot;
/date2=&amp;quot;, my:startDate, &amp;quot; /component=weekdays
/dsnamehol=AustralianHolidays
/xpathhol=/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/*[local-name() =
&amp;#39;&amp;quot;, ../my:Australia_State/my:State, &amp;quot;&amp;#39; and normalize-space()]&amp;quot;)&lt;/span&gt;&lt;span style="font-family:Consolas;mso-fareast-language:JA;"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family:Consolas;mso-fareast-language:JA;"&gt;&lt;font size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;font size="3"&gt;&lt;span style="font-family:Consolas;mso-fareast-language:JA;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font face="Calibri"&gt;What this does is that it only selects non-blank
holidays from the column with the same name as the form’s currently selected
state. For example, *[&lt;b&gt;local-name() = ‘NSW’]&lt;/b&gt; (in the case that &lt;strong&gt;my:State&lt;/strong&gt; is NSW) will select elements from
the data source with the name &lt;b&gt;d:NSW&lt;/b&gt;, and &lt;b&gt;normalize-space()&lt;/b&gt; is a
way of checking that a field is non-blank, excluding spaces.&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3" face="Calibri"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;&lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="mso-fareast-language:JA;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Could you give this formula a try and let us know if it works?&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;font size="3" face="Times New Roman"&gt;

&lt;/font&gt;</description></item><item><title>Re: qrules Date diff - change xpath to a field value which can change.</title><link>https://www.infopathdev.com:443/forums/thread/91590.aspx</link><pubDate>Wed, 24 Jul 2013 00:19:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91590</guid><dc:creator>wapfunz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91590.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=91590</wfw:commentRss><description>&lt;p&gt;Hi Patrick,&lt;/p&gt;&lt;p&gt;Thank you.&lt;/p&gt;&lt;p&gt;I will send the xsn - very much appreciated.&lt;/p&gt;&lt;p&gt;Kind Regards&lt;/p&gt;</description></item><item><title>Re: qrules Date diff - change xpath to a field value which can change.</title><link>https://www.infopathdev.com:443/forums/thread/91589.aspx</link><pubDate>Tue, 23 Jul 2013 23:45:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91589</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91589.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=91589</wfw:commentRss><description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;Yes, you may want to use the fully qualified /my:&amp;lt;root&amp;gt;/.../my:StateDates[filter]/my:DateColumn where the &amp;lt;root&amp;gt; is the default myFields replacement and ... is the intervening path, and the my:StateDates is the parent repeating group and the [filter] is the State filter, for example [my:State=&amp;lt;foo&amp;gt;] where foo is the currently selected one in the main data source form (replace with a field).&lt;/p&gt;
&lt;p&gt;If you do that, you can get rid of the /dsnamehol=AustralianHolidays&lt;/p&gt;
&lt;p&gt;Send us your XSN and we can take a gander.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;P&lt;/p&gt;</description></item><item><title>qrules Date diff - change xpath to a field value which can change.</title><link>https://www.infopathdev.com:443/forums/thread/91586.aspx</link><pubDate>Tue, 23 Jul 2013 22:41:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91586</guid><dc:creator>wapfunz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91586.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=91586</wfw:commentRss><description>&lt;p&gt;Hi ,&lt;/p&gt;&lt;p&gt;Can I replace the x-path portion to the &amp;quot;concat(&amp;quot;DateDiff /date1=&amp;quot;, my:EndDate, &amp;quot; /date2=&amp;quot;, my:startDate, &amp;quot; /component=weekdays /dsnamehol=AustralianHolidays /xpathhol=/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Date_x0028_dd_x002f_mm_x002f_yyy&amp;quot;)&amp;quot;&lt;/p&gt;&lt;p&gt;that is &lt;/p&gt;&lt;p&gt;xpathhol=/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Date_x0028_dd_x002f_mm_x002f_yyy&lt;/p&gt;&lt;p&gt;with&lt;/p&gt;&lt;p&gt;xpathhol= my:DateColumn&lt;/p&gt;&lt;p&gt;where&lt;/p&gt;&lt;p&gt;my:DateColumn is a field that holds the xpath of filtered columns in a list of dates.&lt;/p&gt;&lt;p&gt;If I create a list of dates and other columns that have dates for different States then each xpath will be different.&lt;/p&gt;&lt;p&gt;So when a state is chosen it takes the stored xpath value for that column representing the state and it becomes my:DateColumn which the DateDiff uses?&lt;/p&gt;&lt;p&gt;Thank you.&lt;/p&gt;</description></item></channel></rss>