Friday, 30 July 2021

Join Multiple Tables in Canvas App using Lookup

 Hi all,

So, imagine that you have 2 tables

Table A: "Team Assignment" and Table B: "Player", with Player (Display Name: Player and Schema Name is new_playerid) is the Foreign Key



Now, I want to have gallery in CanvasApp that showing the Information:

Team Name, Player Name, and Date of Birth

I have been trying to find the answer and could not find it because typically if you just use lookup and without match the foreign key which is Player Id in this case, you will not get the correct Date of Birth, instead will just get the "first record" which is in the case is 1-Jul-95 (Donny's)

So, here is the answer:

Put the code in the Items property of the Gallery

AddColumns('Team Assignments', 

"PlayerObject", 

LookUp(Players, Player = 'Team Assignments'[@Player].Player))

With this, you can get all the columns from both tables, if you need just one column, you can just add it in the LookUp formula

Reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

Hope it helps!


17 comments:

  1. Dynamic Netsoft Technologies is a Microsoft gold partner. Reach us, if you looking for Microsoft Dynamics 365 Partners

    ReplyDelete
  2. Good article
    I have found a new app called scan buddy app a pro business card scanner app it helps to scan all your Business Cards automatically.
    For more information please visit
    https://scanbuddy.ai/
    For download please visit Play store .
    https://play.google.com/store/apps/details?id=it.moblize.apps.businesscardscanner

    ReplyDelete
  3. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.
    ibm full form in india |
    ssb ka full form |
    what is the full form of dp |
    full form of brics |
    gnm nursing full form |
    full form of bce |
    full form of php |
    bhim full form |
    nota full form in india |
    apec full form

    ReplyDelete
  4. I have not any word to appreciate this post…..Really i am impressed from this post….

    OU Degree 1st Sem Result
    PDUSU BSC 2nd Year Result

    ReplyDelete
  5. Nice Blog, Stay Connect with our blog CRM

    ReplyDelete
  6. "I came across your recent blog post on this topic and I found it to be extremely informative and engaging. As someone who operates a visa consulting agency, I am always on the lookout for high-quality content that can help me stay up-to-date on the latest industry trends and best practices.

    Your perspective on this issue aligns closely with my own experiences, and I believe that your advice could be incredibly valuable to my clients and followers.

    As such, I would like to request permission to mention our Best Visa and Immigration Consultants services in dubai to your blog post on my website. I believe that my readers would appreciate the opportunity to learn from your expertise, and I would be happy to promote your blog and share it with my own social media followers."

    ReplyDelete
  7. Skip the deposit hassle! car rental ajman no deposit with AutoBots Car Rental to explore freely.

    ReplyDelete
  8. "I was struggling with a similar problem, and this solved it perfectly. Appreciate the detailed breakdown!"
    Franchise India Expo
    Franchise India Expo Mumbai

    ReplyDelete
  9. "Can this approach work if there are multiple foreign keys in the table? If yes, how would it look?"
    Franchise India Expo Bangaluru
    Trough Screw Conveyor feeder delhi

    ReplyDelete
  10. "Great tip! I didn't know you could combine AddColumns and LookUp so effectively."
    Silo Top Dust Filter in delhi
    vibro sifter delhi

    ReplyDelete
  11. "This post clarified a lot for me. I kept running into issues with incorrect data being displayed."
    Warehouse Storage rack manufacturer
    mezzanine floor manufacturer

    ReplyDelete
  12. "What if the 'Player' column has duplicates? How does this code handle that scenario?"
    mobile compactor Manufacturer
    fifo flow rack

    ReplyDelete
  13. "This is a game-changer for displaying complex relationships in Canvas apps. Thanks for sharing!"
    heavy duty rack manufacturer delhi
    Multi tier rack manufacturer delhi

    ReplyDelete
  14. "Is there a performance hit when using AddColumns and LookUp like this in larger datasets?"
    slotted Angle rack manufacturer delhii
    pallet rack in delhi

    ReplyDelete

My Name is..