You need to sign in to do that
Don't have an account?
Vishal Tiwari 36
Creating string from Custom label
I have a custom label in CSV format called Test having value abc, xyz and I want to create a string in the form 'abc','xyz'. How would we do that?
String str = System.Label.Test;
String str = System.Label.Test;
You can get the value in a string and use the split() method to get the values in a list<String>.
Then manipulate the strings in the way you want.
Example - String labelString = System.Label.Test;
List<String> csvStrings = labelString.split(',');
for(String str : csvStrings)
{
// Your logic here
}
Thanks & Regards
Rishab Wali