Skip to main content
Tweeted twitter.com/StackSalesforce/status/1261582185301266433
tags & some formatting (not sure how to do that best)
Source Link
Samuel De Rycke
  • 9.6k
  • 8
  • 46
  • 73

Hi I have a field as 'Category' which can take string separated by comma (,) e.g as below

Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

I am trying to cut the last word from Right i.e 'Sport''Sport' into custom field 'Vertical' and the rest of the text into another custom field 'Event Type'. 

Also the above string can have either one or more than one word separated by comma. If the string has only one word say 'Sport' it should be updated to 'Vertical'

I/p Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

o/p Vertical = Sport Event Type = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure

I/p  Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport


o/p Vertical = Sport

Event Type = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure

What is the best way to implement the formulae?

Hi I have a field as 'Category' which can take string separated by comma (,) e.g as below

Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

I am trying to cut the last word from Right i.e 'Sport' into custom field 'Vertical' and the rest of the text into another custom field 'Event Type'. Also the above string can have either one or more than one word separated by comma. If the string has only one word say 'Sport' it should be updated to 'Vertical'

I/p Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

o/p Vertical = Sport Event Type = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure

What is the best way to implement the formulae?

Hi I have a field as 'Category' which can take string separated by comma (,) e.g as below

Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

I am trying to cut the last word from Right i.e 'Sport' into custom field 'Vertical' and the rest of the text into another custom field 'Event Type'. 

Also the above string can have either one or more than one word separated by comma. If the string has only one word say 'Sport' it should be updated to 'Vertical'

I/p  Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport


o/p Vertical = Sport

Event Type = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure

What is the best way to implement the formulae?

Source Link
Trideep
  • 41
  • 1
  • 1
  • 3

Formula to cut word from a text string

Hi I have a field as 'Category' which can take string separated by comma (,) e.g as below

Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

I am trying to cut the last word from Right i.e 'Sport' into custom field 'Vertical' and the rest of the text into another custom field 'Event Type'. Also the above string can have either one or more than one word separated by comma. If the string has only one word say 'Sport' it should be updated to 'Vertical'

I/p Category = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure, Sport

o/p Vertical = Sport Event Type = Exhibition_Sport and Leisure, Family, Family_Sport and Leisure

What is the best way to implement the formulae?