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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / create collection of r...
Power Apps
Unanswered

create collection of related records

(0) ShareShare
ReportReport
Posted on by 4

I have 2 dataverse table - 'Actor' and 'Service' with '1-M' relationship.

Actor table:

NameCountry
Act1Australia
Act2America

Service Table

ServiceCountry
MarketingAustralia
AdvertisingAmerica

I load records of a country from 'Actor' in a collection 'colactor'. I want to have have another collection with related 'Service' in 

colrelservice'. I have not been able to do it. I tried using ForAll as

clearcollect(colrelservice, ForAll(colactor, {Svc: colactor[@country].Service}) but it gives me an error column not available in context. I tried using filter as well but not able to make much progress. 

Any assistance would be appreciated.

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @Bhatti78 

    According to your description, you want to combine two tables in a collection? And the two tables is 1:M relationships.

    For your need , you need to use the M table to get the data.This is my test data in Dataverse:

    vyueyunmsft_0-1702261801631.png

    In Power Apps , you can use this code to test:

    ClearCollect(data,ForAll('Service Tables' , {Service:cr667_service,Country:cr667_Country.Country,Name:cr667_Country.Name}));

    The result is as follows;You need to replace the real column Name in your side .

    vyueyunmsft_1-1702261836469.png

     

    Best Regards,

    Yueyun Zhang

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard