I have an automated announcement for work anniversaries that checks every night... the # of years is a little too specific. I'd like to show "2"
Any ideas how to fix this email announcement?
Happy 2.00069856671740 Anniversary! We're so glad you've chosen to work for us! We're looking forward to many more years with you!
Jason, Heather & Brandi
I assume that your flow is based on SharePoint list which contains a calculated column for how many years an employee has been working at your company?
The calculated column will be considered as type of text in flow.
Please try the following workaround to see if it will meet your scenario.
There is a calculated column in the list and it is configured as rounddown(([Today]-[StartDate])/365,1) in the list.
In the flow, use the following code to get number of years without too many decimals.
Thank you for your response.
I fixed Sharepoint so the digits show as 2.0000000000000. However, I'm getting an error in Flow likely due to syntax. The error is: InvalidTemplate. Unable to process template language expressions in action 'Send_a_Happy_Anniversary_email_to_SP_Employee' inputs at line '1' and column '2530': 'The template language function 'split' expects two parameters: the string to split as the first parameter, the separator as the second parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#split for usage details.'.
Here is a screenshot of the overall flow:
I have some updates for you.
I have made some more research and I found that it could be simply achieved by using a float function to convert it to float number.
Insert the following code in the Body field of Send an email action:
Please take a try with it.
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.