I am a bit lost on how to get the right informaiton in a data table.
I have 3 lists.
- Companies
- AdTypes
- AdLinks
A Company can have multiple AdTypes associate to it and an AdType can be associated to multiple Companies. The AdLinks list contains the ID of the Company and the ID of the AdType to handle the proper association.
In the App I'm building there is a Gallery that shows the companies and when you select the company it shows a form with all the details. I now want to have a data table that shows the associated adtypes for the selected Company but am clueless on how to get this into the data table.
Any hints would be appreciated!
Solved! Go to Solution.
Thanks for the suggestion Mike, in the end I used some pointers out of this post to make it work:
https://powerusers.microsoft.com/t5/General-Discussion/Syntax-for-joining-tables/td-p/61387
What I did in the end was:
Create a collection that joined the AdType data to the AdLinks information and they used a filter to present it in a gallery.
Thanks!
Hello @Gijsbert,
Check this out and let me know if it helps.
Button1.OnSelect = ClearCollect(ColCompany,{ID:1,text:"Company1"},{ID:2,text:"Company2"},{ID:3,text:"Company3"});
ClearCollect(ColAdTypes,{ID:1,text:"AdType1"},{ID:2,text:"AdType2"},{ID:3,text:"AdType3"},{ID:4,text:"AdType4"});
ClearCollect(ColAdLinks,{CompanyID:1,AdTypeID:1},{CompanyID:1,AdTypeID:2},{CompanyID:2,AdTypeID:2},{CompanyID:2,AdTypeID:4},{CompanyID:3,AdTypeID:1},{CompanyID:3,AdTypeID:3})
DataTable1.Items = ColCompany
DataTable2.Items = Filter(ColAdTypes,DataTable1.Selected.ID in Filter(ColAdLinks,ColAdLinks[@AdTypeID]=ColAdTypes[@ID]).CompanyID)
Thanks for the suggestion Mike, in the end I used some pointers out of this post to make it work:
https://powerusers.microsoft.com/t5/General-Discussion/Syntax-for-joining-tables/td-p/61387
What I did in the end was:
Create a collection that joined the AdType data to the AdLinks information and they used a filter to present it in a gallery.
Thanks!
User | Count |
---|---|
137 | |
127 | |
75 | |
72 | |
69 |
User | Count |
---|---|
220 | |
135 | |
78 | |
58 | |
54 |