You need to sign in to do that
Don't have an account?
Rolando Esteves
String [] split function
I was able to upload records into objects with a custom code in apex. My only problem is that the split function does not care about text delimiters. Is there any possible way to be able to split without afecting fields with commas inside a text delimiter.
Example : "DOG HAS , A HOUSE"
Example Code:
String FileData = FileRecords.toString(); FileData = FileData.replace('"', ''); if(FileData <> NULL) { LineNo = FileData.split('\n');
2. Remove first and last double quote. rowData.substring(1, rowData.length() - 1);
3. Split row by rowData.split('","', ''); - You will get fields data
Imagine a record like this:
"ALPHANUMERIC , NUMERIC" , Dog, Cat , Chicken
Any ideas?