cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyDo
Helper III
Helper III

Relate Many to Many in For All

Hi,

 

I am trying to relate an extra cost to multiple trainees. You can see the Many-to-many relationship in the picture below.

 

2021-08-23 13_47_29-Power Apps.png

 

I have a form 'frmAddExtraCostAddTraining'.

I have a collection 'colSelectedTraineesAddTraining' which holds all the trainees i want to relate to.

I have a button on select: 

 

 

ForAll(
    colSelectedTraineesAddTraining,
    Relate(
        frmAddExtraCostAddTraining.LastSubmit.cref8_ExtraCost_cref8_Trainee_cref8_Train,
        ThisRecord
    )
);

 

 

I have a gallery which has all the trainees in it. It has a label in the gallery with the following code:

 

 

Text(
    varTrainingPrice + Sum(
            ThisItem.'Extra Costs'
        ,
        If(
            cref8_vatinvoice = 'VAT Invoice (Extra Costs)'.'1',
            cref8_pricevatexcluded,
            cref8_price
        )
    ),
    "###,###,##0.00"
)

 

 

 

When i add an extra cost the gallery label 'cost' doesn't change so i don't think the relate function works. Anyone knows how to do this?

 

Greetings,

 

Anthony

 

0 REPLIES 0

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,039)