<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Rule Formula Error - Please Help</title><link>https://www.infopathdev.com:443/forums/thread/51639.aspx</link><pubDate>Wed, 10 Feb 2010 16:39:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51639</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51639.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=51639</wfw:commentRss><description>&lt;p&gt;It&amp;#39;s better post that type of questions right on my site. AddDays sometimes behaive strange. I hit that problem couple times before. As I remember I deleted rule and recreated it again.&lt;/p&gt;</description></item><item><title>Rule Formula Error - Please Help</title><link>https://www.infopathdev.com:443/forums/thread/51628.aspx</link><pubDate>Wed, 10 Feb 2010 11:50:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51628</guid><dc:creator>abrag77</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51628.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=51628</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I currently have a problem that is driving me insane!!&lt;/p&gt;
&lt;p&gt;I am trying to make a text field show the difference between 2 date picker fields. I have found a great website with all the rules written out and also a demo form to download with the whole solution working.&lt;/p&gt;
&lt;p&gt;I have replicated the exact data field types and there label names into my form, and then copied exactly the same rules and conditions to the fields created in my form,&lt;/p&gt;
&lt;p&gt;However I cannot get the 1st rule on the dateDifference field to work it produces the same error every time when testing the formula and being a relative nove at InfoPath I cannot understand what is going wrong.&lt;/p&gt;
&lt;p&gt;The rule and formula on the field is as follows:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Rule 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Condition&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Expression xdDate:AddDays(../my:startDate, substring-before(., &amp;quot;;&amp;quot;)) != ../my:endDate&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;And&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Day difference contains &amp;quot;;&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Rule&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Set Fields Value - DayDifference - &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;concat(substring-before(., &amp;quot;;&amp;quot;) + substring-after(., &amp;quot;;&amp;quot;) * ((translate(addDays(startDate, substring-before(., &amp;quot;;&amp;quot;)), &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;) &amp;lt; translate(endDate, &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;)) * 2 - 1), &amp;quot;;&amp;quot;, substring-after(., &amp;quot;;&amp;quot;) / 2)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The error message I am getting when&amp;nbsp; I click &lt;em&gt;Verify Formula &lt;/em&gt;is &lt;em&gt;Function &amp;#39;AddDays&amp;#39; did not return a value, or it returned a value that cannot be converted to an XSL data type.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;Any help with this would be much appreciated.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks in Advance&lt;/p&gt;
&lt;p&gt;Geoff&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>