web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Building relationship ...
Power Apps
Suggested Answer

Building relationship between SharePoint lists (Lookups or store the ID using number field)

(1) ShareShare
ReportReport
Posted on by 2,023 Season of Giving Solutions 2025
I have 3 SharePoint custom lists:-
 
1) Direction
2) Street
3) Location
 
now each Direction item should be linked to one street and one location.
 
There are 2 ways to build the relation between these 3 lists, as follow:-
 
1) StreetID & LocationID as lookup fields inside Direction list
 
2) StreetID & LocationID as number fields inside Direction list
 
From my point of view here are the pros and cons for each appraoch:-
 
 
1) Lookups Approach
Pros:-
- SharePoint will manage the relation. and SharePoint can dynamically get the other list info such as Street Title , Street Description inside Direction list
 
Cons:-
- Complicate the formulas for creating and updating Directions items inside Power Apps and Power Automate
 
2) Number field Approach
Pros:-
- Ease the formulas for creating and updating Directions items inside Power Apps and Power Automate
 
Cons:-
- I need to manage the relation by myself.
 
 
I tried the Number fields approach in a recent project, and i face those complexities:-
 
1) I have a gallery to show all the Directions items, and their Street Title & Location title and the ability to filter them:-
 
 
2) To do so i have added those fields inside the Directions list:-
 
- Direction Title
- Street Title
- Street ID
- Location Title
- Location ID
 
3) everything seems to work well. but when a user update the street title inside the street list or the Location title inside the location list, then the street title inside the direction list became out of date, and same applies to the Location title..
 
4) to fix this i needed to create a schedule work flow that runs daily, which loop through all the streets and all locations inside the streets and locations lists, For example i loop through all streets inside the streets list >> get all Directions items which have their streetID = the street ID inside the loop and their StreetTitle does not equal the Street Title inside the loop >> then update the StreetTitle inside the Direction list accordingly.. and i did the same for the Locations items..
 
 
so to be honest using number field ease Patching the Direction items,, but have over-complicate manually managing the relation ... so can anyone provide some advice? i might be missing some Pros & Cons ??
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    Using Lookup fields is a better option because SharePoint automatically keeps things up to date, so you don’t have to manage it yourself. It makes things a bit harder in Power Apps and Power Automate, but it’s worth it to avoid problems later. The Number field approach is easier for updates but causes more work when things change. If you use numbers, you can set up Power Automate to update things right away. Overall, Lookup fields are the easier and more reliable choice in the long run.
     
    let me know if you have further questions/thoughts.
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at
    Please do not consider using Lookup fields with SharePoint (I never have or will) - they are an historical structure (SharePoint has been around a lot longer than Power Apps) and cause nothing but unnecessary complications and restrictions in Power Apps.
    They do not create a "relationship" with the second list beyond the primary field being looked up and this can be easily accessed directly from Power Apps (so they really are not necessary).
    They can also be complex to read from / write to and SharePoint will not accepted Delegation on either Sort/SortByColumns by them or filtering using StartsWith.
    You have appropriate reference fields and assuming they are in both relevant lists, so should be easy to reference.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • johnjohnPter Profile Picture
    2,023 Season of Giving Solutions 2025 on at
    @WarrenBelz Thanks for the reply . But if i use the Number field appraoch and i do not directly store the StreetTitle + the LocationTitle inside the Direction list, then when users are viewing this gallery :-
     
     
     
    Power Apps will need to do extra 2 calls to get the LocationTitle + the StreetTitle for each gallery item, which will not be efficient from performance perspectives & from licensing perspectives. as most of our users uses power apps and power automate as seeded license from their E3 license, and they have limited number of of requests that they can do in 24 hours.. so i always care about efficiency inside our power apps and inside our power automate than runs under the user credential (not under the service account credential).. so what do you think ?
  • johnjohnPter Profile Picture
    2,023 Season of Giving Solutions 2025 on at
    SaiRT14 Yes this what i have concluded from my last project where i used the Number filed, and i store the additional info such as StreetTitle & LocationTitle inside the Direction list to avoid dynamically referencing those values for each Direction item.. things will become overcomplicated if we change the Street Title inside the Street list for example.. but most of the highly ranked users on this forum or on YouTube always say to avoid using lookups... but i still feel that they worth using..
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at
    I must note that in the seven years of app development, I have never had a customer run into an API call issue from added columns in a Gallery (or any other reason) and you are one of the few users I have seen raise it as a consideration to basic display queries.
    As you are dealing with a Data Row Limit restricted query whichever way you go, it would be easier if the looked up list is under this limit to capture it using a With() statement at the start and then use AddColumns() for the additional fields. Another approach (again if the second list is under your DRL) is to make a collection from it and do the lookups to that.
    Both involve zero API calls.




  • johnjohnPter Profile Picture
    2,023 Season of Giving Solutions 2025 on at
    Thanks for the reply. but building the whole list using With() or as a collection will raise an issue as in power apps collections can only hold max of 2,000 items...
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at
    I guess I have provided an opinion - you will need to run with whatever is best for you .
  • johnjohnPter Profile Picture
    2,023 Season of Giving Solutions 2025 on at
    Ok thanks a lot for your help. i am not saying that we need to use LookUps... i tried both approaches on real projects,, and till now i am unable to determine which approach to use in the upcomming projects.. as each approach has its own pros and cons
  • WarrenBelz Profile Picture
    156,051 Most Valuable Professional on at
    Strangely, testing here suggests the method you are using seems to accept Delegation with minimal API calls if the query is otherwise delegable (it may be a recent enhancement and it does not in other uses). Just be aware of the other limitations of these field types.
  • johnjohnPter Profile Picture
    2,023 Season of Giving Solutions 2025 on at
    @WarrenBelz
     sorry i did not get you last comment? can you advice more on it please?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard