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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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