Find Last Occurrence Of Character In String

I have a string field (255 chars) that may cut off words.
“…Hello World, thank you for joi”

I am trying to find the last occurrence of ‘space’ and append ‘…’ to remove incomplete words.
So output would return,
“…Hello World, thank you for…”

Tried using substring(), but hard time getting the last position of ‘space’

{{substring(text; 0; indexOf(LAST_POS_OF_SPACE))}}

Any suggestions?

Hi @Bryant_Chang

To Solve your issue, please use below formula:
{{substring(2.Input Text; 0; sum(length(2.Input Text); -1; “-” + length(last(split(2.Input Text; space)))))}}…

Regards,
Msquare Automation - Gold Partner of Make

Book a Free Consultation | Connect Live

Explore our YouTube Channel for valuable insights and updates!

3 Likes