<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Split one data source into multiple repeating sections?</title><link>https://www.infopathdev.com:443/forums/thread/107551.aspx</link><pubDate>Tue, 26 Jul 2016 18:37:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107551</guid><dc:creator>meissen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107551.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=107551</wfw:commentRss><description>Hi all,&lt;br /&gt;
&lt;br /&gt;

I have a SharePoint list with about 1,000 &amp;quot;business requirements&amp;quot; that are categorized by Functional Organization (HR, Engineering, Manufacturing, Design, etc) and by Project Tollgate (Initiate, Design, Plan, Execute, etc).&lt;br /&gt;
&lt;br /&gt;

I need the SharePoint list to filter based on the Project Tollgate -- no problem there, I have a rule which sets the Query field -&amp;gt; Tollgate field to equal the form&amp;#39;s Tollgate field value, then runs the query on the data source.&lt;br /&gt;
&lt;br /&gt;

So now I have a subset of the business requirements that all relate to &amp;quot;Initiate&amp;quot; for example across each Functional Organization. I also have one Repeating Section for each Functional Org (11 repeating sections). I want to take all of the results&amp;#39; IDs where Functional Org = &amp;quot;HR&amp;quot; and put it in the Repeating Section group called &amp;quot;HR&amp;quot;, all results&amp;#39; IDs where Functional Org = &amp;quot;Engineering&amp;quot; goes into the Repeating Section group called &amp;quot;Engineering&amp;quot;, and so on. I have a RequirementID field in each Repeating Section with a default value of SharePointListItem_RW[count(current()/../preceding-sibling::HR) + 1]/ID (where HR is the Business Function and repeating section group&amp;#39;s name -- so HR, Engineering, Manufacturing, etc). The default value works -- as I add rows to the repeating section it automatically populates with the next ID in the data source&amp;#39;s results. But since I haven&amp;#39;t filtered it further, it&amp;#39;s only filtered where Tollgate = Initiate and I need the IDs going into the HR repeating section group to only be where Tollgate=Initiate and FunctionalOrg = &amp;quot;HR&amp;quot;&lt;br /&gt;
&lt;br /&gt;

And that&amp;#39;s where I&amp;#39;m stuck - I can&amp;#39;t figure out how to &amp;quot;dynamically&amp;quot; filter the results. I had the bright idea to try filtering that default value further ((I&amp;#39;m paraphrasing the following so this is not the correct syntax)) -- SharePointListItem_RW[count(current()/../preceding-sibling::HR) + 1]/ID[my:SharePointList/my:FunctionalOrg = &amp;quot;HR&amp;quot;] but that wouldn&amp;#39;t return any results at all.&lt;br /&gt;
&lt;br /&gt;

My work around was to create 11 data sources with a rule on form load that sets the Query field -&amp;gt; FunctionalOrg equal to the numeric value of each functional org... Then when the tollgate field updates, the rule sets the Query field -&amp;gt; Tollgate to the form&amp;#39;s tollgate value to all 11 data sources, queries all 11 data sources, and tada now I have the data source &amp;quot;split&amp;quot; into multiple repeating sections.&lt;br /&gt;
&lt;br /&gt;

But this is cumbersome because it&amp;#39;s querying the same SharePoint list 11 times different sets of data.&lt;br /&gt;
&lt;br /&gt;
there has to be a better way to do this? Either through rules or VB code. Any ideas?</description></item></channel></rss>