<?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>InfoPath</title><link>https://www.infopathdev.com:443/forums/170.aspx</link><description>For questions on using InfoPath in Office 365</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>InfoPath, Excel Services, REST Web Service On premise works, online does not, ???</title><link>https://www.infopathdev.com:443/forums/thread/97220.aspx</link><pubDate>Wed, 30 Apr 2014 14:57:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97220</guid><dc:creator>giustis5</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97220.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=170&amp;PostID=97220</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;I am trying to create an InfoPath form that&amp;nbsp;can calculate the number of days between two dates, the number calculated should take into account weekends, bank holidays and also any other dates I&amp;nbsp;wish to specify.&lt;/p&gt;&lt;p&gt;I have&amp;nbsp;gotten this to work using InfoPath 2010 on a SharePoint Server 2010 Enterprise on premise solution using a REST web service and an excel workbook which I dropped into a document library on SharePoint.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The same solution however does not work&amp;nbsp;using&amp;nbsp;Office 365 SharePoint and InfoPath.&amp;nbsp; &lt;/p&gt;&lt;p&gt;When I go into sharepoint online and customise the form using InfoPath, I can add my REST web service&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="https://MYDOMAIN.sharepoint.com/rcoo/excel/lists/shared%20documents/WorkdaysCalculator.xlsx"&gt;https://MYDOMAIN.sharepoint.com/rcoo/excel/lists/shared%20documents/WorkdaysCalculator.xlsx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Then I can add a Start Date and End Date and Days controls to my form and then add the following rule to the Start Date:&lt;/p&gt;&lt;p&gt;Condition - Start Date is not blank AND End Date is not Blank&lt;br /&gt;Actions -&amp;nbsp;Change the REST Service URL to:&lt;/p&gt;&lt;p&gt;concat(&amp;quot;https://MYDOMAIN.sharepoint.com/_vti_bin/ExcelREST.aspx/rcoo/excel/shared%20documents/WorkdaysCalculator.xlsx/model/Ranges(&amp;#39;A3&amp;#39;)?Ranges(&amp;#39;A1&amp;#39;)=&amp;quot;, ., &amp;quot;&amp;amp;Ranges(&amp;#39;A2&amp;#39;)=&amp;quot;, End Date, &amp;quot;&amp;amp;$format=atom&amp;quot;)&lt;br /&gt;Query REST Web Service&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now I add a rule to the End Date control, &lt;/p&gt;&lt;p&gt;Condition - End Date is not blank and Start Date is not blank&lt;br /&gt;Actions - &amp;nbsp;Change the REST URL to:&lt;/p&gt;&lt;p&gt;concat(&amp;quot;https://MYDOMAIN.sharepoint.com/_vti_bin/ExcelREST.aspx/rcoo/excel/shared%20documents/WorkdaysCalculator.xlsx/model/Ranges(&amp;#39;A3&amp;#39;)?Ranges(&amp;#39;A1&amp;#39;)=&amp;quot;, Start Date, &amp;quot;&amp;amp;Ranges(&amp;#39;A2&amp;#39;)=&amp;quot;, ., &amp;quot;&amp;amp;$format=atom&amp;quot;)&lt;br /&gt;Query REST Web Service&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now I set the default value of my Days control to be equal to the REST Service &amp;gt; entry &amp;gt; content &amp;gt; ns2:range &amp;gt; row &amp;gt; c &amp;gt; v.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now if&amp;nbsp;I do this on SP2010 using InfoPath 2010&amp;nbsp;&amp;nbsp; ** OR **&amp;nbsp;&amp;nbsp; on SP Online using InfoPath 2013, the steps above all do exactly the same thing, the difference is the output when using the list form.&lt;/p&gt;&lt;p&gt;On premise, I pick a start date (a Monday), I pick an end date (a&amp;nbsp;Sunday) and the Days control populates with a number (5) - perfect&lt;/p&gt;&lt;p&gt;Online I repeat the above steps however at the point where the&amp;nbsp;data source is queried, I get the following error:&lt;/p&gt;&lt;p&gt;XML data that is required for this form to function correctly cannot be found.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any ideas why?&amp;nbsp; The excel workbook lives in a sub site which was recognised by InfoPath when it was adding the REST Web Service, the user account im accessing with is an administrator and has full control over everything in SharePoint and office 365.&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>