|
I have a set of strings that are in the following format:
PRODUCT-OPT;Color:Silver=SKU1&Color:Blue=SKU2&Color:Green=SKU3
I would like split out "SKU1", "SKU2", "SKU3" into a list of skus from this string. The items I need are surrounded by "=" and "&" if that helps. I'm pretty new to Crystal Reports and just learning my way around. If anyone can help that would be great. Thank you.
|
|
Hi,
You could use the split function, eg. local stringvar tst := 'PRODUCT-OPT;Color:Silver=SKU1&Color:Blue=SKU2&Color:Green=SKU3'; local numbervar x := 0;
shared stringvar txt1 := ''; shared stringvar txt2 := ''; shared stringvar txt3 := '';
txt1 := split(Split (tst,'=')[2],'&')[1]; txt2 := split(Split (tst,'=')[3],'&')[1]; txt3 := split(Split (tst,'=')[4],'&')[1];
|