Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

Last post 08-12-2015 06:07 AM by Gonzalo Beltran. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-02-2012 02:05 PM

    Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

    Most people must have read this article about concatenating values from a column of a repeat table. If you see the attached picture, I am dealing a different kind scenario-I am dealing with values collected from a multiple-selection list, what didn't work were "concat(Person, ";")" nor "eval(People, 'concat(my:Person, ";")')" nor "eval(eval(People, 'concat(my:Person, ";")'), "..")"

     How should I get the values collected by the multiple-selection list into a string that I could put in textbox?

    Thanks 

    Wei


  • 04-02-2012 02:28 PM In reply to

    Re: Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

    Ok, after reading this page. I added a managed rule on to the Person field with an action to set the value to the field bound to the textbox with formula "eval(eval(Person, 'concat(., ",")'), "..")"

    It only sort of worked as there are still two remaining issues:

    1) leading "," in the textbox

    2) when I unchecked item in the multiple selection list, the textbox is not updated....

    Shouldn't unchecking an item in the Multiple-Selection List also trigger the action to update value of the textbox?

     


  • 04-05-2012 01:39 PM In reply to

    Re: Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

     The InfoPath Form's XML content is like following, and kind of explained the reason behind the leading ",", but why should this happen?:

    <?xml version="1.0" encoding="utf-8"?>
    <?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:ConcatTest:-myXSD-2012-04-02T21-21-26" solutionVersion="1.0.0.2" productVersion="14.0.0.0" PIVersion="1.0.0.0" href="http://bgqw5j1/FormServerTemplates/ConcatTest.xsn"?>
    <?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.3"?>
    <my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-04-02T21:21:26" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-US">
        <my:People>
            <my:Person></my:Person><my:Person>John</my:Person><my:Person>James</my:Person><my:Person>Joe</my:Person><my:Person>Daniel</my:Person>
        </my:People>
        <my:ConcatNames>,John,James,Joe,Daniel,</my:ConcatNames>
    </my:myFields>

  • 04-05-2012 02:40 PM In reply to

    Re: Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

    Found Jimmy's answers to this post: http://www.infopathdev.com/forums/p/14658/52125.aspx

    Very much what I wanted to do, what I still don't get is that why we need to set the default value of the textbox field/control, wasn't it bound to the field already and we are assigning a new value to that field whenever we change the multiple selection list?

    Could one of the steps(assigning value action, and default value of the field) be redundant?  Thx

     

     


  • 08-12-2015 06:07 AM In reply to

    Re: Concatenate "Repeating Fields" collected from Multiple-Selection List into one textbox control

    Thank you! You helped me a lot!

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.