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 / How to Join 3 Tables (...
Power Apps
Answered

How to Join 3 Tables (or More) in PowerApps?

(0) ShareShare
ReportReport
Posted on by 19

I have the following tables in sharepoint:

RoleTable

RoleIDRoleName
1Technician
2Coordinator
3Office Worker

 

TrainingModulesTable

 

ModuleIDModuleName
1Safety Induction
2Procedure A Training
3Procedure B Training
4Procedure C Training
5Third Party Program Training

 

RoleRelevanceTable

RoleRelevanceIDLookUpRoleIDLookUpModuleID
111
212
321
422
523
634
735


This is their relation (RoleRelevanceTable has two "Many to One" relationships)

Mdroid_0-1699400490763.png


I want to create a gallery in powerApps that display the following output:

 

RoleRequired Training
TechnicianSafety Induction / Procedure A Training
CoordinatorSafety Induction / Procedure A Training / Procedure B Training
Office WorkerProcedure C Training / Third Party Program Training


How could I achieve this in PowerApps?

Categories:
I have the same question (0)
  • MudassarSZ365 Profile Picture
    591 on at

    Hi @Mdroid ,

    Here’s a high-level approach to achieving this:

    Use the AddColumns function to expand the RoleTable with a new column that will hold the concatenated string of module names.
    Inside AddColumns, use the Filter function to get relevant records from the RoleRelevanceTable based on RoleID.
    For each filtered record, use the LookUp function to find the corresponding ModuleName from the TrainingModulesTable using ModuleID.
    Use the Concatenate function or similar text functions to create a single string of module names for each role.
    Here’s a rough outline of how you could set up this formula in PowerApps:

    ClearCollect(
     JoinedCollection,
     AddColumns(
     RoleTable,
     "Required Training",
     Concat(
     Filter(
     RoleRelevanceTable,
     LookUpRoleID = RoleID
     ),
     LookUp(
     TrainingModulesTable,
     ModuleID = LookUpModuleID
     ).ModuleName & " / ",
     ""
     )
     )
    )

    This will look up the tab in the collection where the TabId matches the CurrentTabId.

    Kindly mark the solution as accepted if it resolves your issue.

    Best Regards
    Muhammad Mudassar Mazhar

  • Verified answer
    Mdroid Profile Picture
    19 on at

    Hi @MudassarSZ365.

    With a minor adjustment regarding the disambiguation of the RoleID, I was able to get what i wanted.

     

    Note to anyone using Sharepoint Lists in a similar situation, if the "LookUpRoleID" and the "LookUpModuleID"  are indeed lookUp columns, you will get a delegation warning. If you must avoid delegation issues at any costs you must use number field.

     

    Below the final code.

    AddColumns(
     RoleTable;
     "Required Training";
     Concat(
     Filter(
     RoleRelevanceTable;
     LookUpRoleID = Role[@RoleID]
     );
     LookUp(
     TrainingModulesTable;
     LookUpModuleID = ModuleID
     ).ModuleName;
     " / "
     )
     )

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard