Page 1 of 1

Substring parameterized

Posted: Fri May 22, 2020 4:16 pm
by Fabio Pagano
Hi,
I need to use a part of text but i haven't always the same number of characters.

e.s
first step: to wake up
second step: to wash hands
third step: to get dressed

I need to use the part of the sentence before of ":"

like this
first step
second step
third step

I need something like "substring(text,1,index of ":")"

Could you help me?
thanks

Re: Substring parameterized

Posted: Mon May 25, 2020 8:00 am
by Lech Kulikowski
Hello,

You can use the following expression:
{(Variable.IndexOf(":") != -1 ? Substring(Variable, 1, Variable.IndexOf(":") - 1) : "")}

Thank you.

Re: Substring parameterized

Posted: Wed Nov 11, 2020 9:43 pm
by Fabio Pagano
Great! Thank You

Re: Substring parameterized

Posted: Thu Nov 12, 2020 9:16 am
by Andrew
You are welcome, Fabio!