<?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: Default value of static field = field of a specific row in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/87010.aspx</link><pubDate>Tue, 12 Feb 2013 21:26:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:87010</guid><dc:creator>MichaelLogue</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/87010.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=87010</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Disregard - I figured out a work-around.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Basically, I used a combination of the double eval trick and nested substring-before/after functions to extract the info.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In the repeating table, I created a hidden concat field that put the City and State in a single field.&lt;/p&gt;&lt;p&gt;On the main form, I created a new field (strLocation) with the following double-eval statement using semi-colons to delimit the entries:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;strLocation &lt;br /&gt;&lt;/p&gt;&lt;p&gt;eval(eval(group2, &amp;#39;concat(my:strCityState, &amp;quot;;&amp;quot;)&amp;#39;), &amp;quot;..&amp;quot;) &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then, for each of the VIA fields, I used the following:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p id="yui_3_7_2_1_1360704293927_1937" class="yiv545369555MsoNormal"&gt;via1&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_1993" class="yiv545369555MsoNormal"&gt;substring-before(strLocation, &amp;quot;;&amp;quot;)&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_1994" class="yiv545369555MsoNormal"&gt; &amp;nbsp;&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_2280" class="yiv545369555MsoNormal"&gt;via2&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_2279" class="yiv545369555MsoNormal"&gt;substring-before((substring-after(strLocation, &amp;quot;;&amp;quot;)), &amp;quot;;&amp;quot;)&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_2278" class="yiv545369555MsoNormal"&gt; &amp;nbsp;&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_2272" class="yiv545369555MsoNormal"&gt;via3&lt;/p&gt; 
&lt;p id="yui_3_7_2_1_1360704293927_2271" class="yiv545369555MsoNormal"&gt;substring-before((substring-after((substring-after(strLocation, &amp;quot;;&amp;quot;)), &amp;quot;;&amp;quot;)), &amp;quot;;&amp;quot;)&lt;/p&gt;&lt;p id="yui_3_7_2_1_1360704293927_2271" class="yiv545369555MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p id="yui_3_7_2_1_1360704293927_2271" class="yiv545369555MsoNormal"&gt;Probably not the prettiest solution, but it works! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Default value of static field = field of a specific row in a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/87002.aspx</link><pubDate>Tue, 12 Feb 2013 17:01:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:87002</guid><dc:creator>MichaelLogue</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/87002.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=87002</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Here&amp;#39;s the scenario:&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m working with a pre-existing form that I am not allowed to change the existing fields.&amp;nbsp; It&amp;#39;s basically a travel request form (that&amp;#39;s printed out for approval signatures) that includes Departure and Destination fields, with three VIA fields (via1, via2, via3).&lt;/p&gt;&lt;p&gt;&amp;nbsp;We need to track all &amp;quot;via&amp;quot; locations - even if there are more than&amp;nbsp; three intermediary locations.&amp;nbsp; I have created a repeating table where the user can input their entire itinerary.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What I&amp;#39;d like to do is to have the three fixed VIA fields have a default value of the first three rows of the repeating table.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;ie:&amp;nbsp; via1 = Field1 in row 1, via2 = Field1 in row 2, etc.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I&amp;#39;d like to do this using rules as opposed to VBA.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any suggestions?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;&lt;p&gt;Mike &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>