Question
· Jun 4

For Loop over comma seperated String

Hi Community,

My old code:

for x=1,2,3
.dosomethig(x)

Now i Want to customize the comma separated List get from a ClassMethod as String. -> set customString = „1,3,9“

but

for x=customString
.dosomething(x)

wont work for me.

also

for x=$LFS(customString)
.dosomething(x)

doesnt work for me.

i dont want to change the for Loop With an iterator.

is there a possible way to cast the string into a „comma separated List“ for My for Loop?

 

best regards,

Florian

Product version: Caché 2018.1
Discussion (3)2
Log in or sign up to continue