cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Americo2018
Level: Powered On

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
Americo2018
Level: Powered On

Re: Flow is generating its own date!!

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

Super User
Super User

Re: Flow is generating its own date!!

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



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
Level 8

Re: Flow is generating its own date!!

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

Super User
Super User

Re: Flow is generating its own date!!

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



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

Proud to be a Flownaut!


Americo2018
Level: Powered On

Re: Flow is generating its own date!!

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

Super User
Super User

Re: Flow is generating its own date!!

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

 

- Sandy



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

Proud to be a Flownaut!


Americo2018
Level: Powered On

Re: Flow is generating its own date!!

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

Super User
Super User

Re: Flow is generating its own date!!

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



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

Proud to be a Flownaut!


View solution in original post

Americo2018
Level: Powered On

Re: Flow is generating its own date!!

Thanks,

I will give it a try.

 

Thanks!!

 

Regards,

Americo

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,101)