<?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>Search results for 'double eval trick'</title><link>https://www.infopathdev.com:443/search/SearchResults.aspx?q=double+eval+trick</link><description>Search results for 'double eval trick'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Form load rules to set and appended multiple values in MSLB</title><link>https://www.infopathdev.com:443/forums/p/39770/122355.aspx#122355</link><pubDate>Fri, 07 Feb 2020 17:12:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:122355</guid><dc:creator>zosburn</dc:creator><description>&lt;p&gt;This if for InfoPath 2013. Came across a previous thread for writing values from a MLSB to another control which was very helpful for understanding the double eval formula.&lt;/p&gt;

&lt;p&gt;I am attempting to do something similar, but append the selection values within the MSLB control. Currently, I have 5 conditional form load rules which trigger and set a corresponding value in the MLSB. Given the logical nature of InfoPath rules, the 5 form load rules overwrite previously triggered values instead of appending them.&lt;/p&gt;

&lt;p&gt;My initial thoughts were the double eval trick was the right direction, but instead of concatenating values as text into 1 value, I need them to be set as separate values within the MLSB.&lt;/p&gt;

&lt;p&gt;Here&amp;#39;s what I have so far in my formula: eval(eval(changeManagementImpacts_mch, &amp;#39;concat(., &amp;quot;, Translations to be updated or created (French or Spanish)&amp;quot;)&amp;#39;), &amp;quot;..&amp;quot;)&lt;/p&gt;

&lt;p&gt;&amp;quot;, Translations to be updated...&amp;quot; is concatenated as text to my control&amp;#39;s default value (&amp;quot;None Selected&amp;quot;), where instead I would like them to be set as separately selected values.&lt;/p&gt;

&lt;p&gt;Anyone successfully done this before? Any help is greatly appreciated!&lt;/p&gt;</description></item><item><title>Re: Repeating Table from Secondary Data Source with additional fields from Main Data Source</title><link>https://www.infopathdev.com:443/forums/p/29457/119129.aspx#119129</link><pubDate>Wed, 30 May 2018 18:56:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:119129</guid><dc:creator>Daniel_5584</dc:creator><description>&lt;p&gt;I found a solution to grabbing the data, based on what Hilary mentioned in her last post. It involves creating helper fields in the repeating table of the secondary data source.&lt;/p&gt;&lt;p&gt;In the repeating table of the secondary data source create duplicate fields for all of the columns of your data and call them M[FieldName] or whatever makes the most sense to you. These fields will be promoted as merged fields when you publish. The default value in these fields will be a concatenation of the duplicate field&amp;#39;s data, a delimiter, and the row reference.&lt;/p&gt;&lt;p&gt;Ex:&lt;br /&gt;I have a field that populates a combo box of product names from a list; &lt;u&gt;ProductName&lt;/u&gt;. I create a duplicate field for merged data, &lt;u&gt;MProductName&lt;/u&gt;, in the same repeating table. This field (&lt;u&gt;MProductName&lt;/u&gt;) is not displayed on the form.&lt;/p&gt;&lt;p&gt;The&amp;nbsp;default value&amp;nbsp;for &lt;u&gt;MProductName&lt;/u&gt; is as follows: concat(&amp;quot;|&amp;quot;, count(preceding-sibling::*), &amp;quot;|&amp;quot;, &lt;u&gt;ProductName&lt;/u&gt;, &amp;quot;||&amp;quot;, count(preceding-sibling::*), &amp;quot;||&amp;quot;). This will&amp;nbsp;result in the following value for &lt;u&gt;MProductName&lt;/u&gt;: |1|[&lt;u&gt;ProductName&lt;/u&gt;]||1||&amp;nbsp;|2|[&lt;u&gt;ProductName&lt;/u&gt;]||2||&amp;nbsp;|3|[&lt;u&gt;ProductName&lt;/u&gt;]||3||...&lt;/p&gt;&lt;p&gt;Now publish the secondary data source, promoting the repeating table fields M__ as &amp;quot;merged.&amp;quot; Now all the data is available for you to parse in your main InfoPath form, with unique delimiters surrounding each field&amp;#39;s data.&lt;/p&gt;&lt;p&gt;On your main&amp;nbsp;InfoPath form&amp;nbsp;you have a&amp;nbsp;repeating table in which you wish to populate the data from the secondary data source repeating table.&lt;/p&gt;&lt;p&gt;The default&amp;nbsp;values for these fields&amp;nbsp;should be:&amp;nbsp;&lt;/p&gt;&lt;p&gt;substring-after(substring-before(&lt;u&gt;ProductName[SecondaryDatasourceID = MainDatasourceID&lt;/u&gt;], concat(&amp;quot;||&amp;quot;, count(current()/../preceding-sibling::ProductInformation) + 1, &amp;quot;||&amp;quot;)), concat(&amp;quot;|&amp;quot;, count(current()/../preceding-sibling::ProductInformation) + 1, &amp;quot;|&amp;quot;))&lt;/p&gt;&lt;p&gt;What&amp;nbsp;this says&amp;nbsp;is: in the string for Product Name, from the specific form in the&amp;nbsp;Secondary data source,&amp;nbsp;grab everything before ||[current row number]|| and everything after |[current row number]|. That&amp;#39;s it.&amp;nbsp;As long as you have a unique identifier&amp;nbsp;between the datasources to&amp;nbsp;properly filter the data it will populate only the data from the corresponding repeating table element.&amp;nbsp;The nice thing about this is that&amp;nbsp;even if you don&amp;#39;t have the&amp;nbsp;correct number of rows prepopulated in&amp;nbsp;the main InfoPath form all&amp;nbsp;the user needs to do is&amp;nbsp;append rows to&amp;nbsp;populate any remaining data. &lt;/p&gt;&lt;p&gt;&amp;nbsp;So it&amp;nbsp;doesn&amp;#39;t look as messy&amp;nbsp;or confusing you can always create an additional&amp;nbsp;helper column in each&amp;nbsp;repeating table called &amp;quot;counter.&amp;quot; This field would&amp;nbsp;hold :&amp;nbsp;&amp;nbsp;count(current()/../preceding-sibling::ProductInformation) + 1.&lt;/p&gt;&lt;p&gt;&lt;u&gt;counter&lt;/u&gt;&amp;nbsp;can take the place of &amp;quot;count(current()/../preceding-sibling::ProductInformation) + 1&amp;quot; in your subsequent fields.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There is an alternative method&amp;nbsp;using&amp;nbsp;the &amp;quot;double eval()&amp;quot; trick&amp;nbsp;to concatenate the&amp;nbsp;data into a field outside of the repeating&amp;nbsp;table, but I&amp;nbsp;could not get that to work.&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>