cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Americo2018
Regular Visitor

Flow is generating its own date!!

Hi,

I am using MS Flow to create some flows that send emails and copy data from two lists into a third list.

In these lists I have date-time columns that are only using the date, not the time part.

The thing is this:

The list A is receiving abscence notifications which include the abscence's date and a flow send a email notification with the date among other information. The email shows the date in the correct format.

Then, I have another list (B) that receive notifications of when the abscence's period ends and once again, a flow send a notification email with the right date.

 

There is a third list (C) which is used to get track of all abscences and count the amount of days from the date that appears in the A list and the date in the B list. The problem is that the flow that runs to get the data from A and B, and then send it to C, is giving me the wrong abscence's date. Here are some images:

This is the C flow:

 

1.png

 

The trigger is when an item is created in the list B, the floaw get information from the list A - here I am interested in the Date from the list A.

Once I get that data I create a new object in the list C, I am using the date from the A list (Sjukanmälandatum). The result is this:

 

2.png

 

As you see the date I am receiving from the list A is 2017-09-18, but in the list A is:

 

3.png

 

And the confirmation email looks like this:

 

4.png

 

As you see, the email get thte right date!

Why is Flow changing the date? Other thing is that It doesn't matter what day I use in the list A, it is allways 2017-09-18 and that column doesn't have any standard date in its settings.

 

Best regards

Americo

2 ACCEPTED SOLUTIONS

Accepted Solutions

I will need to check that before I can give you a correct answer.

What I can say is that in the Get there is no filter at all.

I have change the "Get Items" to "Get Item", you are right, I only need one item from the list. And for the Id I am using the "ElevID" .

 

"I wonder if somehow it is always Getting the *first* item in List A, which does have a date of 2017-09-18...?"

Once again, it seems you are right, I haven't noted. It seems like it is getting the date of the first object. During the day I have tested different combinations and I saw that the data was repeated but I didn't noted that maybe the flow is taking the date of the first row.

 

I am gona take look to that tomorrow and I will take some printscreen.

 

Thanks for the help,

I will postback how I am doing tomorrow!!

 

Best regards,

Americo

 

View solution in original post

I'm happy to hear you solved the issue, @Americo2018! I think that probably without using the ID for a single item, the Flow was getting the first date value it came to when you were using the Get Items action.

 

Regarding a "number of workdays" calculation, I just ran across this article today: https://blogs.msdn.microsoft.com/carlosfigueira/2017/09/23/excluding-weekends-and-holidays-in-date-d...

The article explains a formula to do this in PowerApps, but I imagine you could do something similar with an expression in Flow (though I haven't tried it myself).

- Sandy

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

7 REPLIES 7
Leo09
Helper V
Helper V

Flow use and convert all the time to UTC time automantically. Do you know that?

SandyU
MVP

Hi, @Americo2018!

 

In the Get Items action, how is the Flow selecting which item from List A to get? Is there a filter by the name that's coming from the new List B item? I wonder if somehow it is always Getting the *first* item in List A, which does have a date of 2017-09-18...?

 

Also, do you not really only want a single item from List A? That is, "Get Item" rather than "Get Items"?

 

- Sandy

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


I will need to check that before I can give you a correct answer.

What I can say is that in the Get there is no filter at all.

I have change the "Get Items" to "Get Item", you are right, I only need one item from the list. And for the Id I am using the "ElevID" .

 

"I wonder if somehow it is always Getting the *first* item in List A, which does have a date of 2017-09-18...?"

Once again, it seems you are right, I haven't noted. It seems like it is getting the date of the first object. During the day I have tested different combinations and I saw that the data was repeated but I didn't noted that maybe the flow is taking the date of the first row.

 

I am gona take look to that tomorrow and I will take some printscreen.

 

Thanks for the help,

I will postback how I am doing tomorrow!!

 

Best regards,

Americo

 

View solution in original post

Great - I'll be interested to hear if you are able to get it resolved!

 

- Sandy

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Finally I solved it!

 

But I don't know how Smiley Happy

 

The only I did was change Get Items to Get Item and use the object ID in there.

The rest of the flow was the same.

 

I was looking a way to count the amount of workdays between the two dates but I only found a formula that works inside of a calculate column, do you now if that can be done with flow?

 

Best Regards,

Americo

I'm happy to hear you solved the issue, @Americo2018! I think that probably without using the ID for a single item, the Flow was getting the first date value it came to when you were using the Get Items action.

 

Regarding a "number of workdays" calculation, I just ran across this article today: https://blogs.msdn.microsoft.com/carlosfigueira/2017/09/23/excluding-weekends-and-holidays-in-date-d...

The article explains a formula to do this in PowerApps, but I imagine you could do something similar with an expression in Flow (though I haven't tried it myself).

- Sandy

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Thanks,

I will give it a try.

 

Thanks!!

 

Regards,

Americo

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,767)