<?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: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91935.aspx</link><pubDate>Mon, 05 Aug 2013 03:54:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91935</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91935.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91935</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello again,&lt;/p&gt;&lt;p&gt;Aside from its use in the double eval trick, the eval() function does not seem to get a lot of use, and I would guess that the majority of InfoPath users don&amp;#39;t know what it does. So I would classify this as a technical formula on account of the use of eval().&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m not sure if it relates to the work you&amp;#39;re doing, but we do have a large number of blogs and webinar videos detailing various techniques and I recommend checking them out. And of course, we&amp;#39;re always here on the forums to help you with any tricky formulas.&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91876.aspx</link><pubDate>Fri, 02 Aug 2013 07:23:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91876</guid><dc:creator>mattsky</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91876.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91876</wfw:commentRss><description>&lt;p&gt;Thanks Again Jimmy, i actually understood that and have used the shortened version extensively now-even building them into conditional rules populating other fields!&lt;/p&gt;
&lt;p&gt;Just out of curiosity, i am the only person i know who uses infopath and i cant seem to find the level of detail anywhere, is this classed as technical or more of a beginner formula ? Only info i cand find is real basic but nothing like im doing.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thanks&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91858.aspx</link><pubDate>Fri, 02 Aug 2013 05:56:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91858</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91858.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91858</wfw:commentRss><description>&lt;p&gt;Hi Mattsky,&lt;/p&gt;&lt;p&gt;So what eval() does is it takes a set of nodes, applies an XPath to each of them, and then returns a new set of nodes with the result(s).&lt;/p&gt;&lt;p&gt;So in the case of my example, this set is just one node.&lt;/p&gt;&lt;p&gt;We start with (just using a sample value here):&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;BtbsStatementDebitCompletedTime&amp;gt;2013-08-02T10:23:23&amp;lt;/BtbsStatementDebitCompletedTime&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The XPath formula &lt;strong&gt;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&lt;/strong&gt; is applied to this:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;substring(., 12, 5) -&amp;gt; &lt;strong&gt;10:23&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;translate(&amp;quot;10:23&amp;quot;, &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;) -&amp;gt; &lt;strong&gt;1023&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;And then this result is returned as a new set of nodes (in this case, just one node):&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;item&amp;gt;1023&amp;lt;/item&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;And this is ready to be used with the | union operator to join with other nodes and use in the max() function.&lt;/p&gt;&lt;p&gt;As a side note, if there are multiple date fields involved here and you want to apply the same extraction technique to them (get characters 12-16 and remove the colon), then instead of this:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;max(eval(BtbsStatementDebitCompletedTime, &amp;#39;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&amp;#39;) | eval(BtbsStatementDebitOtherTime, &amp;#39;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&amp;#39;)&amp;nbsp;| BtbsStatementCreditNumber)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;You can do this instead:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;max(eval(BtbsStatementDebitCompletedTime | BtbsStatementDebitOtherTime, &amp;#39;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&amp;#39;) | BtbsStatementCreditNumber)&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Since, as mentioned above, &lt;strong&gt;eval()&lt;/strong&gt; can operate on a whole set of nodes.&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91797.aspx</link><pubDate>Wed, 31 Jul 2013 06:51:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91797</guid><dc:creator>mattsky</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91797.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91797</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy that works perfectly, have now used on all 10 fields and works a treat!&lt;/p&gt;
&lt;p&gt;I like to understand whats behind some of the formulas to know how to for next time, can you explain a little about what you have done, im not familiar with eval and translate (although i &lt;em&gt;think&lt;/em&gt; i get what translate is &lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Jimmy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Please give this a try:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;max(eval(BtbsStatementDebitCompletedTime, &amp;#39;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&amp;#39;) | BtbsStatementCreditNumber)&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;doing in the formula) 
&lt;p&gt;&amp;nbsp;If its to hard no worries, im still very thankful for the assistance!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;cheers&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91796.aspx</link><pubDate>Wed, 31 Jul 2013 06:51:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91796</guid><dc:creator>mattsky</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91796.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91796</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy that works perfectly, have now used on all 10 fields and works a treat!&lt;/p&gt;
&lt;p&gt;I like to understand whats behind some of the formulas to know how to for next time, can you explain a little about what you have done, im not familiar with eval and translate (although i &lt;em&gt;think&lt;/em&gt; i get what translate is doing in the formula)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If its to hard no worries, im still very thankful for the assistance!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;cheers&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91793.aspx</link><pubDate>Wed, 31 Jul 2013 02:25:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91793</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91793.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91793</wfw:commentRss><description>&lt;p&gt;Please give this a try:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;max(eval(BtbsStatementDebitCompletedTime, &amp;#39;translate(substring(., 12, 5), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;)&amp;#39;) | BtbsStatementCreditNumber)&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>InfoPath 2007 Expression must evaluate to a node-set.</title><link>https://www.infopathdev.com:443/forums/thread/91755.aspx</link><pubDate>Tue, 30 Jul 2013 07:23:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:91755</guid><dc:creator>mattsky</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/91755.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=91755</wfw:commentRss><description>&lt;p&gt;HI All&lt;/p&gt;
&lt;p&gt;Yep im a newbie on this forum so im hoping someone will be able to assist. I have numerous infopath forms feeding into others through data source connections which all sits on sharepoint.&lt;/p&gt;
&lt;p&gt;What the end goal im trying to achieve is select a number of fields (10 in this instance) and find the one with the latest time and have this feeding through into the other forms.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I already have checks making sure the days match up so this is strictly time orientated at this stage.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;the error im getting is &lt;em&gt;Expression must evaluate to a node-set.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;xdMath:Max(--&amp;gt;concat(substring(../my:BtbsStatementDebitCompletedTime, 12, 2), substring(../my:BtbsStatementDebitCompletedTime, 15, 2)) &amp;lt;--| ../my:BtbsStatementCreditNumber)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;the formula im trying is&lt;/p&gt;
&lt;p&gt;max(concat(substring(BtbsStatementDebitCompletedTime, 12, 2), substring(BtbsStatementDebitCompletedTime, 15, 2)) | BtbsStatementCreditNumber)&lt;/p&gt;
&lt;p&gt;Currently i have extra text boxes doing the concat substring work (this is the field &lt;strong&gt;BtbsStatementCreditNumber&lt;/strong&gt;)&amp;nbsp;but i was looking to get rid of these and have it all contained in the one field for ease of use and management (what im trying in the first agrument -if its called&amp;nbsp;that). The above formula is for only 2 fields but this is just a test when it goes live i need it feeding 10, possibly more in other instances.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any help would be appreciated.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thanks&lt;/p&gt;</description></item></channel></rss>