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

Copy Current Campaign(workorder) with related buildings and Related Items

Hello

I'm Building a flow that will copy a Current Campaign (or workorder) and Copy all the Related buildings and Items in that campaign.

My Relations are as follows:

Campaign 1:N Campaign_buildings

Campaign_buildings 1:N Campaign_Items

Campaign 1:N Campaign_Items

 

The flow works up until the copy of the Items. It will correctly create a new campaign and copy the buildings. The issue lies with copying the items. Because it is in the apply to each where I create the 2 buildings it will create the Items twice. 

I tried listing the new Buildings outside of "Create campaign building the apply to each" and running a separate apply to each but this would still create all the items for every building.

 

I have added some screenshots of my flow and the apply to each in question.

screenshot 2.png

screenshot3.png

screenshot4.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sambaken
Regular Visitor

Solved this by taking out the link to campaign_buildings and having two separate apply to eaches. One to make campaign_buildings(lookups to campaign / buildings) and one to make Campaign_items (lookups to campaign / items)

View solution in original post

1 REPLY 1
Sambaken
Regular Visitor

Solved this by taking out the link to campaign_buildings and having two separate apply to eaches. One to make campaign_buildings(lookups to campaign / buildings) and one to make Campaign_items (lookups to campaign / items)

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,244)