Page 1 of 1

String concat all array item in JS designer

Posted: Thu Nov 26, 2020 6:28 am
by d-hcelik
Hi
I have a datasource(modal object)
in a text I want to write modal property values(there are many values in one property,it is array...)

for example my modal is user list [{ userName=john,ID=1 }{ userName=janny,ID=2 }{ userName=alex,ID=3 }{ userName=Mohammed,ID=4 }{ userName=Moses,ID=5 } ]

I want to write all username in one text without using databand.What should I do?Can I use for or for each loop in js report designer

FFOR my modal
{
{MyModalList.Username}
}

Re: String concat all array item in JS designer

Posted: Fri Nov 27, 2020 1:56 pm
by Lech Kulikowski
Hello,

You can use the following function:
{Func.EngineHelper.JoinColumnContent(DataSourceName, "ColumnName", "delimiter")}

Thank you.

Re: String concat all array item in JS designer

Posted: Mon Nov 30, 2020 6:23 am
by d-hcelik
thanks

Re: String concat all array item in JS designer

Posted: Mon Nov 30, 2020 8:48 am
by Andrew
You are welcome!