Announcements
I have a variable which I would like to restrict to the first 100 characters. How would I include this as an expression in my flow?
Hi @tpitman,
That would be something like below.
substring('<text>', <startIndex>, <length>)
In your case:
substring(outputs('Compose'), 0, 100)
Below is an example in a Compose
You can also use the substring action instead.
Thank you very Much!!
I think this is better:
if(greater(length(outputs('Compose')),100),substring(outputs('Compose'), 0, 100),outputs('Compose'))
Hi @VictorIvanidze,
Yes, I totally agree. It is definitely good practice to check if the value actually is greater than 100 characters before using the substring function 👍
I just wanted to start simple, by first explaining the substring function. I assumed this was going to be a follow-up question after my first reply and I would have explained the length and greater functions than. I was aiming for the step-by-step explanation approach 😁
Thank you both.
The text is ALWAYS going to be > 100 so it should be fine 🙂
out of interest, if I wanted to extract a string with characters 5-8, would it be as simple as "Starting position" 5, length 3
Using the substring action of course
Try it!
Yep! that works!! 🙂
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Vish WR 816
Valantis 603
Haque 566