web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Merging two Collection...
Power Apps
Unanswered

Merging two Collections into a new Consolidated one using info from both collections

(0) ShareShare
ReportReport
Posted on by 9

Dear All, 

I am struggling with an app that I have been creating to replicate our roster system at work. 

  • I have a fixed set of employees (e.g. 5) belonging to one shift (Shift A) which is saved to collection1. See Table below
Shift NameEmployee NumberEmployee Name
SHIFT A1ABC1
SHIFT A2ABC2
SHIFT A3ABC3
SHIFT A4ABC4
SHIFT A5ABC5

 

  • I have another collection (collection 2) that lists down the shift schedule details over a predetermined time period. E.g. over 35 days, a person belonging to shift A will work 7 times in the morning, 7 times in the afternoon etc. See Table 2
ShiftNameShiftTypeStartTimeEndTimeStartDateIncrementDate
SHIFT AMorning06:0013:00Date1Date1
SHIFT AMorning06:0013:00Date1Date2
SHIFT AMorning06:0013:00Date1Date3
SHIFT AMorning06:0013:00Date1Date4
SHIFT AMorning06:0013:00Date1Date5
SHIFT AMorning06:0013:00Date1Date6
SHIFT AMorning06:0013:00Date1Date7
SHIFT AAfternoon13:0020:00Date2Date1
SHIFT AAfternoon13:0020:00Date2Date2
SHIFT AAfternoon13:0020:00Date2Date3
SHIFT AAfternoon13:0020:00Date2Date4
SHIFT AAfternoon13:0020:00Date2Date5
SHIFT AAfternoon13:0020:00Date2Date6
SHIFT AAfternoon13:0020:00Date2Date7
  • I need to merge both collections so that I can create a new collection that lists down each shift for each person. See Table 3
ShiftNameShiftTypeStartTimeEndTimeStartDateIncrementDateEmpName
SHIFT AMorning06:0013:00Date1Date1ABC1
SHIFT AMorning06:0013:00Date1Date2ABC1
SHIFT AMorning06:0013:00Date1Date3ABC1
SHIFT AMorning06:0013:00Date1Date4ABC1
SHIFT AMorning06:0013:00Date1Date5ABC1
SHIFT AMorning06:0013:00Date1Date6ABC1
SHIFT AMorning06:0013:00Date1Date7ABC1
SHIFT AAfternoon13:0020:00Date2Date1ABC2
SHIFT AAfternoon13:0020:00Date2Date2ABC2
SHIFT AAfternoon13:0020:00Date2Date3ABC2
SHIFT AAfternoon13:0020:00Date2Date4ABC2
SHIFT AAfternoon13:0020:00Date2Date5ABC2
SHIFT AAfternoon13:0020:00Date2Date6ABC2
SHIFT AAfternoon13:0020:00Date2Date7ABC2

etc. for all employees. 

I have followed all forums on how to merge one collection with one another using the lookup function to search for SHIFT A since it is the common field however I cannot get anything to work and I am struggling with it. Any help would be greatly appreciated.

Thanks, 

Alistair

Categories:
  • C-Papa Profile Picture
    1,836 on at

    Hi, try the below, it should create collection 3 out of collection 1 and 2 

    ClearCollect(Collection_3,collection1,collection2)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard