cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LyonsBI_BRL
Resolver I
Resolver I

PowerAutoMate Flows Emails Item Below

I'm having kind of a strange issue here when I go to mark an item as Archived  = true, then I kick off a PowerAutoMate action to send an email to the customer.

I first have it Patch the CustomersDB on this item so that Archive = TRUE, then Patching the Delivery Date so we know when the item went out. 

Patch('Customers',ThisItem,{Archive:ArchiveSet.Value=true});
Patch('Customers',ThisItem,{'Delivery Date':DeliverDate.SelectedDate});
'DELIVERED'.Run(ThisItem.First_Name,ThisItem.Last_Name,ThisItem.'Description',ThisItem.'E-mail')

Finally I run a PowerAutoMate flow which kick off an email based off that item. Example: Below I have highlighted the item in yellow I am going to set to ARCHIVE. However the email kicks off for the item highlighted in dark blue. I'm thinking it's trying to email the item right below it.

 

LyonsBI_BRL_0-1620797611964.png

 

Now in PowerAutoMate, I have set a condition for IF Archive = true. So if the Archive column for that item has true in it, kick off the email flow. However that doesn't seem to work when I have it turned on.

LyonsBI_BRL_1-1620799006045.png

 

Any suggestions here? I seem to be missing something crucial here. 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @LyonsBI_BRL ,

I am trying to look at a couple of things at once here - try the below

UpdateContext({varItem:ThisItem});
Patch(
   Customers,
   {ID:varItem.ID},
   {
      Archive:true,
     'Delivery Date':DeliverDate.SelectedDate
   }
);
DELIVERED.Run(
   varItem.First_Name,
   varItem.Last_Name,
   varItem.'Description',
   varItem.'E-mail'
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @LyonsBI_BRL ,

I am trying to look at a couple of things at once here - try the below

UpdateContext({varItem:ThisItem});
Patch(
   Customers,
   {ID:varItem.ID},
   {
      Archive:true,
     'Delivery Date':DeliverDate.SelectedDate
   }
);
DELIVERED.Run(
   varItem.First_Name,
   varItem.Last_Name,
   varItem.'Description',
   varItem.'E-mail'
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

@WarrenBelz Warren you are the man of the hour! 😄

That worked perfectly! And I was thinking here "Crap...how am I going to solve for this one" lol. This community just amazes me 😄

Hi @LyonsBI_BRL ,

Galleries have a nasty habit of resetting things when code is run from inside them, so the first thing to do is grab the record value you need (the Variable at the top). You also were doing two patches when you only needed one and your true/false syntax was wrong - so I am glad I got three out of three first time (unusual for me).

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 (1,587)