Concatenate multiple row values into one string - InfoPath Dev
in

InfoPath Dev

Concatenate multiple row values into one string

Last post 10-21-2009 12:55 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-16-2009 07:25 AM

    • bradb
    • Not Ranked
    • Joined on 10-16-2009
    • Posts 4

    Concatenate multiple row values into one string

    I have an Infopath form for printing off a work order summary. I have a text section that I want to auto-populate with data from the SQL database. The problem is, the software that handles our workorders stores multiple lines as multiple records with a possibility of up to 300+ lines.

     For example:

    SQL DB

    WORK_ORDER_NO         LINE_NO       VALUE

    11111111                         1                    This is the

    11111111                         2                    value of

    11111111                         3                    work order number 11111111

     

    I need to be able to get the VALUE fields concatenated into one string where the WORK_ORDER_NO is equal to the work order entered in a text box in the Infopath form. (ie. "This is the value of work order 11111111")

    I know how to do it IF I knew how many lines there were going to be, but there could be 3, or 300.

    Any suggestions would be greatly appreciated!

     

    Thanks

  • 10-21-2009 12:55 PM In reply to

    Re: Concatenate multiple row values into one string

    Hmmm. Most posts around the double eval() method are used to concatenate together things like email addresses, separating with a semicolon. That being said, I'd think you could use the double eval() method here, with a space for the separator, instead of a semi-colon. The InfoPath Team Blog has a good post about double eval() here.

    Now, your scenario gets a bit trickier, because it is also conditional. There is a fantastic post about making double eval() conditional here. All that being said, however, it might be easier to be pulling your data from a view where the values had already been concatenated.Then you could use a simple rule to populate your text field when the work order has been entered into the text box on the form.
    Hilary Stoupa

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