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 / CDS Forms - Gallery re...
Power Apps
Unanswered

CDS Forms - Gallery relationship

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi 

 

I created a Screen with Form1 and Gellery1

 

Form 1 has basic information like VoucherNo, Create Date, Amount and Description. Datasource - Commission

Gallery1 is a repeating with fields Salesperson, Commission etc. - Datasource - CommissionDetails - collection

 

Below is the sample of my submit button. As you can see I was trying to get the DocID and VoucherNo to get a key relationship. This code works on SQL but not on CDS.

 

On CDS I created two entities Commissions and CommissionDetails thereby Commission is the Main Header for my Form and Gallery respectively.

 

I need to establish a relationship between these two entities so far it's been unsuccessful. I would appreciate some help. 

 

Patch(Commissions,Defaults(Commissions),
{cr684_amount:Value(DataCardValue7.Text),
cr684_description:DataCardValue5.Text,
cr684_comments:DataCardValue25.Text
});

ForAll(CommissionDetails,Patch('Commission Details',Defaults('Commission Details'),
{cr684_employeeid:EmployeeID,
cr684_salescommission:Commission,
cr684_commissiontype:CommissionType,
cr684_salesrep:SalesPerson,
cr684_description:DataCardValue5.Text,
DocID:'New Voucher'.LastSubmit.'Voucher No'}));
Navigate(Application_Portal,Cover);Navigate('Launch Screen', ScreenTransition.Cover)

 

Thanks

Dickson

Categories:
  • Javier Gallego Profile Picture
    Microsoft Employee on at

    Hi Dickson, 

     

    In this document you can see an entity relationships overview.

    https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/create-edit-entity-relationships

     

    I hope it helps you.

    Javi.

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard