Combining fields with formatted text in a Repeating Section - Part 2 - InfoPath Dev
in

InfoPath Dev

Combining fields with formatted text in a Repeating Section - Part 2

Last post 06-03-2012 05:56 PM by PAWInfo. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-28-2012 08:18 PM

    • PAWInfo
    • Top 200 Contributor
    • Joined on 09-14-2008
    • Melbourne, Australia
    • Posts 52

    Combining fields with formatted text in a Repeating Section - Part 2

    Hello,

    Used the code from this wonderful forum:

    http://www.infopathdev.com/forums/p/20875/72441.aspx#72441

    eval(eval(CountryRepeating, 'concat(my:Cntry, " | ")'), "..")

    My answer ends up:

    US | Thailand | UK |

    Any way to make it not do the final | (pipe) after UK?

    Cheers,

    PAW

  • 05-28-2012 11:54 PM In reply to

    Re: Combining fields with formatted text in a Repeating Section - Part 2

    Please give this a try:

    substring(eval(eval(CountryRepeating, 'concat(" | ", my:Cntry)'), ".."), 4)

    Notice that I've surrounded it with that substring() function and reversed the order of " | " and my:Cntry.  The 4 corresponds to the length of " | " (which is 3) plus 1.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-30-2012 04:54 PM In reply to

    • PAWInfo
    • Top 200 Contributor
    • Joined on 09-14-2008
    • Melbourne, Australia
    • Posts 52

    Re: Combining fields with formatted text in a Repeating Section - Part 2

    Jimmy,

    Thx so much, worked like a charm!

    Only one small annoyance, I could not cut and paste and I actually had to use insert Function in InfoPath for each one,

    which I find a bit strange.  Microsoft could improve the Function editor to be more friendly.

    PAW

  • 05-31-2012 12:55 AM In reply to

    Re: Combining fields with formatted text in a Repeating Section - Part 2

    If you check the Show XPath checkbox, it will show the formula in a format that can be copied elsewhere, modified and copied back.  Leaving it unchecked shows the formula in a more readable format that's not as conducive to copy-pasting.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-03-2012 05:56 PM In reply to

    • PAWInfo
    • Top 200 Contributor
    • Joined on 09-14-2008
    • Melbourne, Australia
    • Posts 52

    Re: Combining fields with formatted text in a Repeating Section - Part 2

    Thx again mate!

     PAW

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