Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Looping Strings in Load Script

Hi There,

Are there any examples of functions that can be used in the load script that loop over a string?

Even split the string into an array and loop the array?

I'm trying to do this...

http://community.qlik.com/thread/41760

2 Replies
Not applicable
Author

Hi,

in the following example string from values variable is split into tokens with ',' delimiter. In for loop each token (value variable) can be processed separately. Maybe you can modify it to your needs.

set values='a,b,c';

let commaCount=SubStringCount(values,',');

for i=1 to commaCount + 1

let value=subfield(values,',', i);

next

regards

nstefaniuk
Creator III
Creator III

I have replied in the previous thread