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

CDS Forms - Gallery relationship

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • Javier Gallego Profile Picture
    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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard