Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a filed called "Opportunity Status" in Salesforce. which has the below values:
"Closed - Won",
"Lost/Inactive/Invalid",
"Open",
"Open - Committed"
I want to split the value "Lost/Inactive/Invalid" to
"Closed - Won",
"Lost"
"Inactive/Invalid"
"Open",
"Open - Committed"
Can you help?
With SubField you can break a value into separate rows based on a delimiter. If you only want to split on the first delimiter, then replace that for another (e.g. |) and use that for the subfield delimiter
Load SubField(if(Index(Data,'/')=0,Data,Mid(Data,1,Index(Data,'/',1)-1)&'|'&Mid(Data,Index(Data,'/',1)+1,len(Data))),'|') as new;
Load * Inline [Data
"Closed - Won",
"Lost/Inactive/Invalid",
"Open",
"Open - Committed"
];
do you want to break into separate rows? If yes, you can use subfield function in the script break into two rows like below:
SubField(Replace(OpportunityStatus,'/I','|I'),'|') as NewFieldName
Hi Srikanth,
Thank you for your reply. I however want "Inactive/Invalid" as one of the values in the filter. The above script splits the data into:
"Closed - Won",
"Lost"
"Inactive"
"Invalid"
"Open",
"Open - Committed"
With SubField you can break a value into separate rows based on a delimiter. If you only want to split on the first delimiter, then replace that for another (e.g. |) and use that for the subfield delimiter
Load SubField(if(Index(Data,'/')=0,Data,Mid(Data,1,Index(Data,'/',1)-1)&'|'&Mid(Data,Index(Data,'/',1)+1,len(Data))),'|') as new;
Load * Inline [Data
"Closed - Won",
"Lost/Inactive/Invalid",
"Open",
"Open - Committed"
];
Thanks a lot Piet. This is what I was looking for.