Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have a text field with words and sentences in (i.e. a full commentary field). I want to create another field that has a summary of said field with a limit of words or length but remaining as full words. If I use the left() function obviously it counts characters so all of my summaries end with broken words. Can anyone think of a simple solution?
As an example,
'The quick brown fox jumped over the lazy dog' let's say I want to restrict this field to a maximum of 12 characters but only include full words. So I'm happy if it is less than 12 characters as long as it has full words up to that point.
Thanks
Gareth
you could keep the first 12 characters, find the last space and then keep the text up to that space.
Something like
=left(var1,index(left(var1,12),' ',-1))
Hi Garteh, you could also try the following, that finds the next space of the truncated string and completes the last word.
Regards
=left(vstr,12) & subfield(subfield(vstr,left(vstr,12),-1),' ',1)
Thanks both very helpful answers!!