+ Start a Discussion
Mike 317Mike 317 

Pulling multiple values from case description

Hey, 

I need to find a way to pull a few values from case.description. I'm very new to code, and i have no idea where to start. Here's what i need:
if case.description is:
"VAR1: Juice
 VAR1: Lime
 VAR3: Ginger"
How can i put the values for Vars 1-3 into their respective case fields?

Any help is greatly appreciated. Thanks!
Siddharth83JainSiddharth83Jain
Hi Mike,

For the above scenario you would need to work with delimiters and other string formats. So if your VAR1 or VAR3 if these constants are defined then look for these constants uptill you find a newline delimiter as per your example. So basically you can split your data based on newline delimiter so that it transforms into Array. 

Then loop thru your array to find KEY which will be VAR1 in this case and then assign the value to correct field. I hope this explains. 

Please mark this as best answer if it helps.

Thanks
Siddharth
OSI Consulting.