Showing results for 
Search instead for 
Did you mean: 
Not applicable

WDL seems brittle

recently i discovered that MS Form fields are 4000 chars, standard SharePoint text fields are 255 chars, this was causing my Flow to fail.  ok, i said, i will simply truncate the Form fields...


1> SubString(myString,255)   - fails the Flow if the string is less than 255 characters   >.<

2> If(Length(myString)>255, SubString(myString,255), myString)   - fails as Flows compiles both Then and Else code regardless of which will be executed. thus the substring call fails because the string is less than 255 chars

3> substring( body('Get_response_details')?['rbd9c988d66d74de6ab4c502e474d721c'],0, If( greater(length(body('Get_response_details')?['rbd9c988d66d74de6ab4c502e474d721c']),254),254, length(body('Get_response_details')?['rbd9c988d66d74de6ab4c502e474d721c']) ))


finally, the code that works. what a lot of rooting around just to truncate a field!  any suggestions? i have another 160 fields to fix up

Community Support Team
Community Support Team

Re: WDL seems brittle

Hi @  Betc,



I have made a test on my side,and haven't find any way to solve your problems effectively than your's.


I afraid that there the only way to achieve your needs is the one you provided in Microsoft Flow currently.


I would make more research on it,once I have found a way to achieve your needs,I would reply here.



Alice Zhang

Helpful resources


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,997)