Question : Infopath SQL Server 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

Answer : Infopath SQL Server Concatenate multiple row values into one string

Random Solutions  
 
programming4us programming4us