Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: jtcm4568 on January 13, 2022, 03:50:40 PM
-
Hello!
New forum member, been using Genesys for about 2 years.
I have a situation where I need to parse out a URL (for shortening before sending an SMS, if that matters :)) and, if the LAST character in the URL is a period (.) I need to drop it (apparently our shortening service can't do this for us, and we have issues with ONE of the URL's that has a period stuck on the end...yes, that's a far-end application issue, but I'm fixing it.
In Excel (or SQL, for that matter) this would be a fairly trivial matter....something like =LEFT(STRING,LEN(STRING)-1).
However, I can't find a way to do anything like that in IRD. If it was a unique character on the end of the string, I could manage that, but since it's a period (.) it's far too common the see within the URL...
Is there anything I'm missing?
IRD 8.1.400.39
Thank you all for your help!
-
Try using strsub and strlen in combination.
Strlen gives the length of the string you want to trim.
Reduce that number and use strsub to get the substring of the original string up to the result of strlen minus one?
Br
Skickat från min Mi MIX 3 5G via Tapatalk