cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mozzerellagoril
Frequent Visitor

Add only 1 column from a collection to an existing collection

**all dummy data

 

This is the existing collection, "AS"-

mozzerellagoril_0-1664939041154.png

ClearCollect(
AS,
ForAll(
Attendance,
Patch(
ThisRecord,
LookUp(
COM,
cl_code = Attendance[@cl_code]
)
)
)
);

 

The column I want to add is from the collection "SessionInfo", this is how it looks like -

mozzerellagoril_1-1664939134779.png

I only want to add the column, " Capacity" into according to the "cl_code" column in "AS" 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @mozzerellagoril ,

 

Please try:

 

ClearCollect(
   AS,
   ForAll(
      Attendance,
      Patch(
         ThisRecord,
         LookUp(COM,cl_code = Attendance[@cl_code]),
         {capacity:LookUp(SessionInfo,cl_code = Attendance[@cl_code]).capacity}
      )
   )
);

 

Best Regards,

Bof

View solution in original post

4 REPLIES 4
v-bofeng-msft
Community Support
Community Support

Hi @mozzerellagoril ,

 

Please try:

 

ClearCollect(
   AS,
   ForAll(
      Attendance,
      Patch(
         ThisRecord,
         LookUp(COM,cl_code = Attendance[@cl_code]),
         {capacity:LookUp(SessionInfo,cl_code = Attendance[@cl_code]).capacity}
      )
   )
);

 

Best Regards,

Bof

mozzerellagoril
Frequent Visitor

Hi, it seems that the solution is interfering with the another collection of mine..

ClearCollect(
SessionInfo,
ForAll(
Session,
Patch(
ThisRecord,
LookUp(Class,cl_code=Session[@cl_code]),
LookUp(Speaker,sp_id=Session[@sp_id])
)
)
);

 

Before the solution code, "SessionInfo" was able to collect all the data from SQL, however with "AS" now in effect, it can only partially collect data..

mozzerellagoril_0-1665019670187.png

 

The code for "SessionInfo" is the first ClearCollect, followed by 2 other and then "AS" last

 

Hi @mozzerellagoril ,

 

It seems that these two formulas will not affect each other, and I suggest you perform it separately and check if the problem still exists.

 

Best Regards,

Bof

mozzerellagoril
Frequent Visitor

Hi @v-bofeng-msft ,

I have tried multiple times, and unfortunately when the two formulas are together, only "AS" is complete and "SessionInfo" is partially full. When I remove "AS", "SessonInfo" is a complete table. Both these formulas are placed in "OnStart".

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,320)