Concat a repeating table's entries to a single field with each entry on a new line. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Concat a repeating table's entries to a single field with each entry on a new line.

Last post 03-17-2009 12:42 PM by fromonesource. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-17-2009 11:19 AM

    Concat a repeating table's entries to a single field with each entry on a new line.

    Hello,

    I am new to this site and this is my first post, of what I am expecting to be many - as I usually have many questions. But, my questions is involving a repeating table in InfoPath that has entries that I would like to submit to an already created SharePoint List. With this, I would like to have all entries submited to a single cell on the list, but to have each entry on a new line. I am able to list out all the entries from the repeating table to a separate field in info path, but I am having problems with creating each entry on a new line. I try using the "<li>","</li>" pieces, and also tried "/n" - but each time, the output just writes out the text. My function that I have currently is this :

    eval(eval(notesgroup, 'concat("~ ", my:notesdate, ": ", my:notes)'), "..")

    which gives me this output:

    ~ 2009-03-17: test 1~ 2009-03-17: test 2~ 2009-03-17: test 3

    and am thinking that I want something like this:

    eval(eval(notesgroup, 'concat("<li>", my:notesdate, ": ", my:notes, "</li>")'), "..")

    but that gives me this output:

    <li> 2009-03-17: test 1 </li><li> 2009-03-17: test 2</li><li> 2009-03-17: test 3</li>

    and I want the output to look something like this in a single cell (so I can then send that field to SharePoint

    2009-03-17: test 1

    2009-03-17: test 2

    2009-03-17: test 3

    Let me know if I am going about this the wrong way or if I am missing a step in this.

    Thanks,

    FD

  • 03-17-2009 11:30 AM In reply to

    Re: Concat a repeating table's entries to a single field with each entry on a new line.

     I just recently had a similar issue, take a look at my blog to see if this gets you on the right track: http://surepoint.wordpress.com/2009/02/23/inject-line-breaks-into-data-views-for-infopath-repeating-fields/

  • 03-17-2009 11:48 AM In reply to

    Re: Concat a repeating table's entries to a single field with each entry on a new line.

    That looks like what I have in mind - but ideally, I would like to keep this in the xpath function itself and limit the amount of separate coding involved. I could be seeing this wrong (and I often do) and this is meant to be placed in the xpath function, but I am not sure then where it needs to go.

  • 03-17-2009 12:00 PM In reply to

    Re: Concat a repeating table's entries to a single field with each entry on a new line.

    Are you trying to display the data in a data view web part in sharepoint or is this a standard list?

  • 03-17-2009 12:30 PM In reply to

    Re: Concat a repeating table's entries to a single field with each entry on a new line.

    This is in a standard list. We have been toying with the idea of using that list in a web part, but we have not yet come to that. So currently, it is a standard list.

  • 03-17-2009 12:42 PM In reply to

    Re: Concat a repeating table's entries to a single field with each entry on a new line.

    As long as your field in infopath is rich text, it should display the html in a standard list. If you have a copy of sharepoint designer, try following my method by creating a data view just to see if that solves the issue. There is not much you can do to modify the out of the box list display.

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