Hi Team I am facing a issue below, please help me to resolve this
Step 1: I have initialized a variable diffdates as integer, which I want to find the difference of day (today, task end date)
Below in the Apply to each loop, I am trying to find out the values using some formula in Set Variable
Like I have added Task Name and its corresponding Project Name in the Email body I want the DateDiff of the corresponding tasks to be displayed.
Below I have attached the email
Please help me in this. Thank you in advance.
Hi @Prajnya :
This is due to the nested structure of your flow: the body of the email is actually completed in ”apply to each3“, because ”apply to each3“ is a sub-loop of ”apply to each 2“, so the datediff obtained in the body of the email is always current A fixed value of ”apply to each 2“ loops.
My suggestion is to reorganize the structure of this flow.
Best Regards,
Bof
When I run the flow
Attached here the Email
The Date diff it is taking as 84 for all tasks. not forming array for this.
I just wrongly presses Accept as solution, please be with me I am sending the instances I have tried, Thanks
Hi @Prajnya :
I noticed that you have obtained the correct value and saved it in a variable. Why can't you call this variable directly?
Could you please tell me what is the meaning of "But not able to form an array in the EmailBody"?Do you you want to group these dates into an array?If so,you could try "append to an array" action.
Best Regards,
Bof
Thank you for your quick response
Yes, I am getting correct Date Difference Value in this Step,
But not able to form an array in the EmailBody
Please find my below images, I am getting correct Day Difference using the same formula you have mentioned above but I want them to be displayed in the Email also like Task name, Project Name of the Task
If insert the variable vardiffdates in the email body then it is taking 84 as the date difference of 1st task not making array, also Append to String Variable but not worked.
Please help in another way, Thanks
Hi @Prajnya :
Sorry,I'm not sure what your current problem is.Could you please tell me :
Did you get the correct datediff value at this step?
About how to get the number of days between two Dates
div(sub(ticks(startOfDay(utcNow())),ticks(startOfDay('2019-05-04T08:00:00Z'))),864000000000)
If you have obtained the correct datediff value, then just insert the variable vardiffdates in the email body.
Best Regards,
Bof
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional