Page 1 of 1

Concat 3 columns in one string

Posted: Mon Jan 23, 2023 7:30 pm
by rafael.custodio
Hi,

I have a table where the data goes:

Table: ClaseBr

ClaseId
197
198
199
200
201
203

ClaseName
1º ANO C|Manhã
2º ANO A|Tarde
3º ANO D|Manhã
4º ANO B|Manhã
EFI5AM
EFll6AM

ClaseImported
true
true
true
true
false
false

I need to concat that information in one string like this:
197|1º ANO C|Manhã|True,198|2º ANO A|Tarde|True, .... and so on.

I can't have it as an output running on a databand.
I tried to use something like the code below, but I can't add more than one column in the same string:
Func.EngineHelper.JoinColumnContent(ClaseBr,"ClaseId",",")


Is there a way to do it?

Re: Concat 3 columns in one string

Posted: Mon Jan 23, 2023 9:02 pm
by Lech Kulikowski
Hello,

You can an additional variable, and concat all values in the events or in additional databand.

Thank you.

Re: Concat 3 columns in one string

Posted: Tue Jan 24, 2023 12:25 pm
by rafael.custodio
Hi @Lech Kulikowski, thank you for replying.

Like I said I can't have that running in a databand because I need to process the strings post-concat.

Capturar01.JPG
Capturar01.JPG (80.16 KiB) Viewed 678 times


Could you please give me examples of how to do it with an additional variable in the events?

Re: Concat 3 columns in one string

Posted: Wed Jan 25, 2023 12:38 pm
by rafael.custodio
Hi guys! Any answer is going to be greatly appreciated.

Re: Concat 3 columns in one string

Posted: Wed Jan 25, 2023 2:28 pm
by Kirill Klimenkov
Hello.

Please, check the attached report template.
Note that in will work only in the Compilation mode.

Thank you.