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 new user group experience and if you are a leader please create your group
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.