function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike 317Mike 317 

Pulling multiple values from case description


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!
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.

OSI Consulting.