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 / Creating a collection ...
Power Apps
Unanswered

Creating a collection with concated column from related data

(0) ShareShare
ReportReport
Posted on by 559

Hi guys,

 

So i made a collection that holds all the information about a few Trainings that were selected. This collection is used to trigger a power automate flow that exports that collections data into a excel file. See picture below.

 

Anthony_Dob_0-1632907362192.png

Anthony_Dob_1-1632907382165.png

 

I am now trying to add a column to that collection that holds all the Trainees names, attending that training. The data is all located into Dataverse. Trainings <-> Trainees is a many to many relationship.

 

Anthony_Dob_2-1632907751149.png

 

 

I tried the following codes but with no succes:

 

Collect(
 colCevoraExportList1,
 ""
);
Clear(colCevoraExportList1);
ForAll(
 // The next filter returns me all the training records within the galTrainings gallery
 Filter(
 Trainings,
 Training in galTrainings.AllItems.Training
 ),
 Collect(
 colCevoraExportList1,
 {
 Name: Name,
 Training: Training,
 CreatedOn: 'Created On',
 DurationInDays: 'Duration In Days',
 EligibleForSubsidy: 'Eligible For Subsidy',
 IsDeleted: 'Is Deleted',
 IsSent: 'Is Sent',
 Organiser: Organiser,
 Price: cref8_price,
 PriceVatExcluded: 'Price VAT Excluded',
 PriceVatIncluded: 'Price VAT Included',
 Remarks: Remarks,
 StartDate: 'Start Date',
 Summary: Summary,
 TrainingPaymentMethod: 'Training Payment Method'.Name,
 TrainingType: TrainingType.Name,
 VatInvoice: 'VAT Invoice',
 YearStartDate: 'Year Start Date',
 Trainees: 
 // im an trying to get all the Trainees 'First Name' in a column. I need this because i use the collection to Export the selected trainings in a Excel file 
 Concat(
 LookUp(
 Trainings,
 Training = ThisRecord.Training && 'Created On' = ThisRecord.'Created On'
 ).Trainees,
 'First Name' & ", "
 )
 }
 )
);

//i use this function on a Gallery which return me all the Trainees attending the selected Training on a "Details page"

/*LookUp(
 Trainings,
 And(
 ThisRecord.Name = varSelectedTraining.Name,
 ThisRecord.'Created On' = varSelectedTraining.'Created On'
 )
).Trainees*/

 

Collect(
 colCevoraExportList1,
 ""
);
Clear(colCevoraExportList1);
ForAll(
 Filter(
 Trainings,
 Training in galTrainings.AllItems.Training
 ) As A,
 Collect(
 colCevoraExportList1,
 {
 Name: A.Name,
 Training: A.Training,
 CreatedOn: A.'Created On',
 DurationInDays: A.'Duration In Days',
 EligibleForSubsidy: A.'Eligible For Subsidy',
 IsDeleted: A.'Is Deleted',
 IsSent: A.'Is Sent',
 Organiser: A.Organiser,
 Price: A.cref8_price,
 PriceVatExcluded: A.'Price VAT Excluded',
 PriceVatIncluded: A.'Price VAT Included',
 Remarks: A.Remarks,
 StartDate: A.'Start Date',
 Summary: A.Summary,
 TrainingPaymentMethod: A.'Training Payment Method'.Name,
 TrainingType: A.TrainingType.Name,
 VatInvoice: A.'VAT Invoice',
 YearStartDate: A.'Year Start Date',
 Trainees: Concat(
 A.Trainees,
 'First Name' & ", "
 )
 }
 )
);
//i use this function on a Gallery which return me all the Trainees attending the selected Training on a "Details page"
/*LookUp(
 Trainings,
 And(
 ThisRecord.Name = varSelectedTraining.Name,
 ThisRecord.'Created On' = varSelectedTraining.'Created On'
 )
).Trainees*/

 

On the codes you can find at the bottom a function i use to receive all Trainees from a Training.

 

How can i make this work? I would expect that "A.Trainees" would work as it is related but it gives the erorr: "Column is not accesible in this context".

 

Best Regards,
Anthony

Categories:

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard