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
Leigh Smith 5Leigh Smith 5 

How to split semi colon separated values in a text field into tasks.

The field is populated with text that is semi colon (;) seperated values. I want to create a new task based on each delimited value. 

I am able to change the format of the data populating the field if needed. 
AnkaiahAnkaiah (Salesforce Developers) 
Hi Leigh,

What values you need to populate in the text field?

each value you need to create a task?

Thanks!!

 
Leigh Smith 5Leigh Smith 5
Yes correct the data in the field looks like this:

text1;text2;text3;text4;

And I want to create a task for each like this:

Task1(text1), Task2 (text2), Task3 (text3) etc.

Thanks.
Yash Kumar GuptaYash Kumar Gupta

Hi Leigh,

you can do this....
List<String> lstOfTask = fieldName.split(';');


Thanks,