Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there, I have a field (called GROUP) containing multiple strings like this one:
Group1/Group2/Group3/Group4/Group5
and so on.
I don't always have the same number of substrings (divided by the '/'), sometimes there are more than 5 and sometimes less than 5.
I'd like to remove from these strings the last subfield, intependently of the number of substrings.
Has anyone any clue about how could I get this done?
Hi
As long as you have at least two substrings this should work for you
Left(GROUP ,Index(GROUP,'/',SubStringCount(GROUP,'/'))-1)
Regards
Adrian
use the formla: =SubField('Group1/Group2/Group3/Group4/Group5','/',-1)
it retreives the last subfield after the defined character from right (defining -1)
instead of hardcoded text use your data field
Hi
As long as you have at least two substrings this should work for you
Left(GROUP ,Index(GROUP,'/',SubStringCount(GROUP,'/'))-1)
Regards
Adrian
Thanks, but that's not what I'm looking for, I wanted to keep the rest of the string, not the last one.
Thank you, it worked perfectly!
I was assuming it had to do with the Index function.