cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
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

1 REPLY 1
Highlighted
Community Support
Community Support

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.

 

 

Regards,
Alice Zhang

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (5,976)