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
@mikekiser Here is a blog on the substring action:
I am trying to use this after reading the blog but I am getting a syntax error
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.'.
@mikekiser In the run of that error. Could you share the parse json2 address1 property value.
I want to confirm what is in the address1 property.
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
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.