Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate String in a Loop

Hello!

I am trying to build a string to use later in my script.

I want to generate the string: 'Reportees1,Reportees2,Reportees3,Reportees4,Reportees5'

The following code is not working. Any ideas?

Let buildString = 'Reportees1';

For level = 2 to 5

  Let buildString = $(buildString) & ',Reportees' & $(level);

Next level

Trace $(buildString);

1 Solution

Accepted Solutions
Not applicable
Author

Solved my own problem!

I had to enclose the variable in quotes so that QV would treat it as a string.

  Let buildString = '$(buildString)' & ',Reportees' & $(level);

View solution in original post

1 Reply
Not applicable
Author

Solved my own problem!

I had to enclose the variable in quotes so that QV would treat it as a string.

  Let buildString = '$(buildString)' & ',Reportees' & $(level);

View solution in original post