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