We have some addresses that are greater than 30 chars and I have to truncate those to 30 chars max.....what I am trying to do is
Thanks for your response but it still failed
InvalidTemplate. Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '2956': 'The template language function 'substring' parameters are out of range: 'start index' and 'length' must be non-negative integers and their sum must be no larger than the length of the string. Please see https://aka.ms/logicexpressions#substring for usage details.'.
You are getting this error if the string you're trying to substring is too short.
Try adding a condition to check for this before doing the conversion
Please take a look at my POC:
Keep in mind I am using lots of Compose actions to show what is happening. You can use less for your solution
First I get the length of address1
Than I use a IF condition to check if address1 is greater than 30 chars
Use the substring() expression on address1
my expression is:
with address1= This Address is too short
With address1 = This Address is too long and will be trunked
Three Super User rank tiers have been launched!
Features releasing from October 2020 through March 2021
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!