<?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: XPATH Code Help. Pull from two Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/95811.aspx</link><pubDate>Wed, 12 Feb 2014 07:09:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95811</guid><dc:creator>RaYvA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95811.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95811</wfw:commentRss><description>&lt;p&gt;Hi, you have to use some logic&amp;nbsp;called &lt;em&gt;&amp;quot;Becker&amp;#39;s method&amp;quot;&lt;/em&gt;, attributed to &lt;a href="http://www2.informatik.hu-berlin.de/~obecker/XSLT/"&gt;Oliver Becker&lt;/a&gt;, which looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;concat(&lt;br /&gt;&amp;nbsp; substring($s1, 1, number($condition)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * string-length($s1)),&lt;br /&gt;&amp;nbsp; substring($s2, 1, number(not($condition)) * string-length($s2))&lt;br /&gt;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Which then has to be wrapped into the &lt;strong&gt;familiar&lt;/strong&gt; &amp;#39;double eval&amp;#39; expression in Infopath for it to work.&lt;/p&gt;
&lt;p&gt;Here&amp;nbsp;is&amp;nbsp;an expression I&amp;#39;ve used previously that ONLY works if&amp;nbsp;one of the input expressions&amp;nbsp;IS Blank (IT WILL NOT WORK&amp;nbsp;IF BOTH EXPRESSIONS CONTAIN DATA!):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;xdMath:Eval(xdMath:Eval(../my:FirstArgument, &amp;#39;concat(substring(../my:FirstArgument, 1, ../my:FirstArgument * string-length(../my:FirstArgument)), substring(../my:SecondArgument, 1, (string-length(../my:SecondArgument) &amp;gt; 1) * string-length(../my:SecondArgument)))&amp;#39;), &amp;quot;..&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So, assuming your field expressions are correct, substituting FirstArgument and SecondArgument with your field expressions and your expression should look something like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM(&amp;quot;IMA Tasks Team 1&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()], &amp;#39;concat(substring(xdXDocument:GetDOM(&amp;quot;IMA Tasks Team 1&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()], 1, xdXDocument:GetDOM(&amp;quot;IMA Tasks Team 1&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()] * string-length(xdXDocument:GetDOM(&amp;quot;IMA Tasks Team 1&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()])), substring(xdXDocument:GetDOM(&amp;quot;BSD Second Task List&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()], 1, (string-length(xdXDocument:GetDOM(&amp;quot;BSD Second Task List&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()]) &amp;gt; 1) * string-length(xdXDocument:GetDOM(&amp;quot;BSD Second Task List&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()])))&amp;#39;), &amp;quot;..&amp;quot;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Maybe my XPath is wrong, but I hope you understand what is supposed to happen.&amp;nbsp; If your first field expression returns an ID it will be returned, if your second field expression returns and ID it will be returned.&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;</description></item><item><title>XPATH Code Help. Pull from two Data Sources</title><link>https://www.infopathdev.com:443/forums/thread/95371.aspx</link><pubDate>Wed, 22 Jan 2014 16:39:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95371</guid><dc:creator>Drewlocks</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95371.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=95371</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I&amp;#39;m trying to pull from two data sources into one field based on some conditions:&lt;/p&gt;&lt;p&gt;xdXDocument:GetDOM(&amp;quot;IMA Tasks Team 1&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()] or xdXDocument:GetDOM(&amp;quot;BSD Second Task List&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:Title = current()]&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m using OR in my syntax does not seem to recognize both statements.&lt;/p&gt;&lt;p&gt;Please Help&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>