You need to sign in to do that
Don't have an account?
asadim
FIND alternative: search from right to left (similar to INSTRREV)
Anybody knows if there's a way to tell a WF field update formula to look for a string from the end? Something like INSTRREV in Access.
Thanks!
You can use RIGHT(text, num_chars) . It returns the specified number of characters from the end of a text string. Hope this helps.
RIGHT does a different thing than what I want. I want to get the index of a character/string from the end. I'm looking for something like FIND but searching from right to left (FIND searches from left to right). Basically I'm looking for the equivalent of INSTRREV in Access.
Were you able to find a solution to this? I'm looking to find the last space in a string, which seems very simple but I'm finding it impossible because I don't know how many spaces are in the the string, and as you noted find only works from left to right.
For this use: lastIndexOf
Are you looking to do a search like:
Phrase: 'This World' Search for: row (Found Right to Left at r in Wor)
Or
Phrase: 'This World' Search for: Wor (Found Right to Left at W in Wor)
And are you trying to search across object using SOSL or just searching a string from a specific field (trigger, apex, etc)
That sounds exactly like what I'm looking for. However when I try to use that function (in a workflow field update) I get the error "Error: Unknown function lastIndexOf. Check spelling." I also don't see it as an available function in the formula editor. What am I missing? Thanks.
Hal