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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

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

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,820)