Forum Discussion
relation between SharePoint lists in a way that is aligned with Power apps recommendations
We have those SharePoint 4 SharePoint lists:-
1) Asset
2) Medium
3) Asset Spare Parts. Each item inside this list will be related to an Asset + a Medium + a Payment Category
4) Payment Category
Now I got lost of what is the best way to build the relation between the Asset Spare Parts list and the other 3 lists???
First Approach, will be to create 3 SharePoint lookup fields inside the Asset Spare Parts list to link it to the other 3 lists. but i always read and get advices to avoid using SharePoint Lookup fields as they will not work well and will cause lot of issues inside Power Apps
Second Approach, Instead of creating 3 lookup fields, to just create 3 Number fields to store the Asset ID + Medium ID + Payment Category ID inside the Asset Spare Part list. but the issue will be when we want to show the list of Assets Spare Parts inside a gallery and we need to show the Asset Title + Payment Category Title + Medium Title. to do so, we need to write these formulas inside the Asset Spare Parts Gallery:-
Lookup(Medium, ID=ThisItem.MediumID).Title
Lookuo(PaymentCategory, ID= ThisItem.PaymentCategoryID).Title
Lookup(Asset,ID= ThisItem.AssetID).Title
This will work well, but we will face this major issue:- where most of our users have E1 & E3 licenses, and hence they can only make 6,000 requests per day inside the Power Platform. and using the above 3 formulas to get the info of the other lists, will cause the gallery to send 3 requests to SharePoint for each item when navigating through a gallery... which will not work for us , due to the 6,000 requests limit. and since we have around 40 SharePoint lists which are connected together..
Third approach. is that store store the IDs of the related 3 lists items (as in second approach) and also store the Titles of the related 3 lists items... i can do this when adding and update the Asset Spare Parts list's items.. but the issue will be on how we can keep the titles up-to-date, incase the title of the related Assets and/or the title of the related PaymentCategory and/or the title of the related Medium, get updated.. so we can run a sync job to sync the titles... but this approach will also have these 2 drawbacks:-
- the idea that updating a title will not get reflected inside the other lists till the sync job runs, might not be much appreciated by the client
- the overhead we will have to write the sync job,,, we have around 40 SharePoint lists which are connected together..
so to be honest i got lost on which approach to follow? using SharePoint lookup field seems to be the way to go,, but it is always adviced to stay away from using SharePoint lookup fields in Power apps... so is there other approach to consider which will not have any drawback and will be able to work with large lists, as in our case?
thanks