Hi,
I have recently started to build apps on my Android. I have 2 data sources.
1. Table 1{ID, Name, Date, Ticket Details}
2. Table 2 {ID, Name, Region}
I would like to be able to display items based on Region selected. I am thinking to use Filter function on Table 1 by Region but I would need to somehow join the 2 tables by common field [Name] in order to be able to do so.
Any idea or help will be appreciated. Thank U!
Cheers
Boon Yar
Solved! Go to Solution.
Hi
In my scenario,
I have
Sharepoint list 1: Title,Product
sharepoint list 2: Title,MyProducts
Can anyone please help me with getting these values into PowerApp form.
Thanks in advance.
If I am understanding your question correctly I am doing something similar with a Categories and Subcategories list in SharePoint.
Categories have Columns {ID, Title, Category}
SubCategories have Columns {ID, Title, CategoryLookup, Subcategory} where CategoryLookup is a Lookup field to the Categories list.
On my form I have a Category dropdown which looks up the category
I also have a second field Subcategory which looks up the subcategory (needs to be related to the category, ignore the warning it has to do with delegation)
In the Items property for my Subcategory control I have the following expression:
SortByColumns(Filter(SubCategories,CategoryLookup.Value = CategoryLookupFilter_Dropdown.Selected.Value),"SubCategory")
The key is the Filter function.
SubCategories - Data source pointing to my Subcategories list in SharePoint
CategoryLookup - Column in the Subcategories list
CategoryLookup.Value - I get the Value property from the lookup, I could use the ID property as well would need to adjust the other side of the equation
CategoryLookupFilter_Dropdown - the control on my PowerApps form
CategoryLookupFilter_Dropdown.Selected.Value - gets the value that was selected in the dropdown
If I used the IDs the code would be
SortByColumns(Filter(SubCategories,CategoryLookup.Id = CategoryLookupFilter_Dropdown.Selected.Id),"SubCategory")
I wrap the result in a SortByColumns command to sort the data by the SubCategory column of my filtered datasource.
Hope this helps.
does not help at all, that link provides no content on having multple datasources.
I don't understand how this works since you are doing a add column a gallery and it's a lookup.
@rgruian is method 1 working with CDS data source?
gallery1.Items = AddColumns(Table1, "Region", LookUp(Table2, Name = Table1[@Name], Region))
I tried the formula below but it just returns an empty column for "Assessment Section"
AddColumns(
'Assessment Details',
"Assessment Section",
LookUp('Assessment Questions','Assessment Question' = 'Assessment Details'[@'Assessment Question'].'Assessment Question', 'Assessment Section')
)
This is the entity relationships for those 3 entities
Hi How do we do this when there are 2 joining criteria
gallery1.Items = AddColumns(Table1, "Region", LookUp(Table2, Name = Table1[@Name], Region))
User | Count |
---|---|
262 | |
110 | |
98 | |
54 | |
39 |