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

SPL Create/Delete Item

I have (2) SPL's that are identical.  One is for active use with PowerApps and the second I am using as an archive.  The Flow I am trying to create would, on recurrence basis, look for a date in SPL#1 associated with the record.  If a date exists the Flow would create that item in SPL#2 then delete it from SPL#1.  My Flow works up to the point of deleting the record from SPL#1.  Any advice?

Microbes_0-1661262786307.png

 

Microbes_1-1661262811645.png

 

7 REPLIES 7
MarconettiMarco
Super User
Super User

Hello @Microbes ,

which kind of error are you getting? can you show it in details?

 

BR,

Marco

Microbes
Resolver I
Resolver I

@MarconettiMarco ,

There is no error.  The Flow executes, the item is created in SPL#2 ("archive") but is not deleted from SPL#1 ("active"). So,  SPL#2 quickly becomes saturated with redundant items because they are not being deleted from SPL#1.

Hello @Microbes ,

I've replicated the scenario and all is working fine from my side:

MarconettiMarco_0-1661270800853.png

 

I've noticed in your screenshots that you have 2 Apply to each controls. You should have only one Apply to each loop that refers to the "value" grabbed from the "Get items" action.

 

Please let me know if the issue is fixed.

I may not have all the answers, but I'm curious and passionate enough to keep looking for answers and to keep sharing them.

 

If I have answered your question, please mark my post as Solved.
If you like my response, please give it a Thumbs Up.

 

My blog site about Power Automate: https://powerautomatejoy.com/

BR,

Marco

@MarconettiMarco ,

Thanks for the response.  I have (2) Apply_to_Each because I want the Flow to evaluate the date on condition of Now-7days.  If true, then Create Item (in SPL#2) then Delete Item (from SPL#1).  I guess I could have two separate Flows, one for Creating and one for Deleting, with the Delete Flow set to run recurrent an hour after the Create Flow, but was hoping to do both actions in one Flow. 

Hello @Microbes ,

if you're referring to the same "Get items" array, you don't need 2 Apply to each loops.

 

BR,

Marco

@MarconettiMarco ,

Good to know, thanks.  So, in your opinion, if I remove the second Apply_to_each after the Condition and have the Create and Delete actions in series as they are now, it should work?

Hello @Microbes ,

I think so, from my side it's working.

 

Please let me know if the issue is fixed.

I may not have all the answers, but I'm curious and passionate enough to keep looking for answers and to keep sharing them.


If I have answered your question, please mark my post as Solved.
If you like my response, please give it a Thumbs Up.


My blog site about Power Automate: https://powerautomatejoy.com/

BR,

Marco

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,929)