Hello,
i have an app based 2 data sources
When the user open the app he can select 2 screens
The problem lays in the All Users screen.
i can easily show all users inside the gallery, using the following code in the Items element of the gallery
Search(
AddColumns(
UsersSPList,
"UserName",
User.DisplayName,
"LocationName",
'Location: City',
"Location2",
'Location: State'
),
Searchbar.text,
"UserName",
"LocationName",
"Location2"
)
but how can i show the same data on the map considering that it should match user and location based on the city?
For instance it should take the first user, check the City value in the Users SharepointList, lookup for that City in the Locations SharepointList and retrieve Lat and Long from there...
how can i accomplish this? what should i write inside the map Items value? how can i load two data lists inside the same search function?
I have to use this messy approach because the address component doesn't let me search for cities instead of addresses, and for privacy policies i can just ask the user for his city. Had to make this huge list with cities and their locations...
Thank you so much
Solved! Go to Solution.
Hi @Antonioclk ,
You could try:
With(
{TheTable:Search(
AddColumns(
UsersSPList,
"UserName",
User.DisplayName,
"LocationName",
'Location: City',
"Location2",
'Location: State'
),
Searchbar.text,
"UserName",
"LocationName",
"Location2"
)},
ForAll(
TheTable,
Patch(
ThisRecord,
{
Lat:LookUp(Locations,CityName=ThisRecord.LocationName).Lat,
Long:LookUp(Locations,CityName=ThisRecord.LocationName).Long
}
)
)
)
Best Regards,
Bof
Hi @Antonioclk ,
You could try:
With(
{TheTable:Search(
AddColumns(
UsersSPList,
"UserName",
User.DisplayName,
"LocationName",
'Location: City',
"Location2",
'Location: State'
),
Searchbar.text,
"UserName",
"LocationName",
"Location2"
)},
ForAll(
TheTable,
Patch(
ThisRecord,
{
Lat:LookUp(Locations,CityName=ThisRecord.LocationName).Lat,
Long:LookUp(Locations,CityName=ThisRecord.LocationName).Long
}
)
)
)
Best Regards,
Bof
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
200 | |
96 | |
56 | |
51 | |
42 |
User | Count |
---|---|
263 | |
157 | |
83 | |
80 | |
57 |