cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
phh
Helper IV
Helper IV

location in newform not working?

Hi all,
Can it fit you can not add any address once you have created the field location in the sharepoint list. Can't add anything Does anyone have an answer?

See the picture
- Peter

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@phh,

Have you seen my complete solution? I have listed all the detailed steps.

Please give up using a Gallery to get the longitude and latitude values which will cause all the address to display the same longitude and latitude.

You should create 2 columns to store longitude and latitude values within your SP list.

If you do not know how to save your longitude and latitude values to your SP list, please do follow the following steps.

>>Create 2 Text type columns named 'Longi' and 'Lati' within your SP list.

>>Create an App via your SP list

001.png

The app you created from your SP list has a pre-built setting that you can click an item within the Gallery and edit it in an EditForm.

Set the Default property as below:

 

BingMaps.GetLocationByAddress({addressLine:DataCardValue8.Text}).point.coordinates.latitude
BingMaps.GetLocationByAddress({addressLine:DataCardValue8.Text}).point.coordinates.longitude

 

Note: DataCardValue8 represents the Address.

Then you can click the submit button and you will do have a similar SP as below:

091001.png

>>Refresh your SP list within your App.

>>Now you need to add an Image control like this and set the Image property as below:

091402.png                                                                                                                          

 

 

 

 

"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road?&" & Concat(
    AddColumns(
        YourSPlist,
        "pp",
        "pp=" & Lati & "," & Longi & ";" & 21 & ";" & YourAddressColumn
    ),
    pp,
    "&"
)
& "&key=AskiLXdKpycN0Xdu-TXktMH_NrUEVzC7tysUv88d1-7n193t-tRhK-YQXkMjf1rI" /*” Aivzmzq……“ is my key*/

 

Please do read my solution completely! Every step is important.

0914Gif11.gif

Best Regards,

Qi

View solution in original post

15 REPLIES 15
v-qiaqi-msft
Community Support
Community Support

Hi@phh,

Based on the issue that you mentioned, do you want to edit Location columns within PowerApps?

Actually, it is a known issue with the Location column within PowerApps.

In the SharePoint list, you can edit the Location column as below:

090202.png09020201.png

If you create an App via the related location list, PowerApps does not recognize the Location column but does recognize the related columns as shown below.

090201.png

In a word, I am afraid that there is no way to edit Location columns within PowerApps currently.

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

As an alternative solution, you can add Text type columns within the SP list and edit them within a form in PowerApps. To achieve this, you should add BingMaps connection to your app, and add a Label within your DtaCard, set the Text property as below:

 

Location.Altitude

 

More location parameters, you can check the following article:

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/signals

Best Regards,

Qi

Hi @v-qiaqi-msft 

Hi, I'm probably not quite sure how to do it.
will you make a user-friendly guide on how to do it, plz 🙂

If you have time to write now here it could be cool.

-Peter

v-qiaqi-msft
Community Support
Community Support

Hi@phh,

>> First, you should have a BingMaps API key, you can check the following article to get it.

https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/getting-a-bing-m...

You can download the complete list of keys to check your keys.

090104.png

>> Add the BingMaps and SP list to your app.

>> Add Text columns within your SP lits as you need, I create two named Country and Address.

>> Add a Button and set the OnSelect property as below:

 

Set(myLocation, BingMaps.GetLocationByPoint(Location.Latitude, Location.Longitude).address)

 

>> Set the Default property of TextInput control corresponding to DataCard of  'Country' & 'Adress' as below:

 

myLocation.countryRegion​   *// Put it into the TextInput belonging to 'Country' DataCard 
myLocation.formattedAddress  *// Put it into the TextInput belonging to 'Address' DataCard 

 

090204.png

Best Regards,

Qi

Hi@phh,

Sorry that I could only focus on this case.

Let me make it easy for you, you want to populate all of these Location information within your App and display within a Gallery.

My solution in the previous reply has clarified that you could not edit Location columns within PowerApps.

Even though you said that users don't have to write back to the SP list, you still could not use Location columns within PowerApps, because that if you want to display location information within the Gallery, you should first submit the form or use Patch() to save location information. However, neither the SubmitForm() nor Patch() could recognize the Location columns within PowerApps

I have provided an alternative solution that adds Text columns to store the related location information, which is the only solution to work with your needs in PowerApps.

What's more, if you use BingMaps connector, it only supports capture these locations:

  • country/Region
  • addressLine
  • postalCode
  • formattedAddress

If you could receive my solution, within your gallery, set the Text property of the corresponding Labels as below:

ThisItem.Address
ThisItem.Country
ThisItem.PostalCode

Best Regards,

Qi

Hi @v-qiaqi-msft,

Okay, 

I also think that's the right way. I'm just very much in thriv about how it works in relation to the link that I post in the second question see this again:

https://www.sharepointsiren.com/2019/03/plotting-multiple-map-points-in-powerapps/

Do you have control over how to do it as happens in the link.
Is it necessary with the latitudes and longitudes. Or it can take it next to the address, zip code, country


I hope you can help! 🙂

- Peter

v-qiaqi-msft
Community Support
Community Support

Hi@phh,

Yes, it is necessary with the latitudes and longitudes if you choose to connect the BingMaps connector.

I want to confirm that have you ever tried my solution to configure your Gallery?

I've seen what's in the link the time you first posted, and my solution does the same thing as you wish as below:!.png

As for other Labels, you can set to what you want within your dataset.

You can see the screenshot above, is that you want? The solution you posted within that link which uses different parameters.

What's more, if you want to add a map within, you can check the following article.

https://docs.microsoft.com/en-us/bingmaps/rest-services/imagery/get-a-static-map

Best Regards,

Qi

Hi @v-qiaqi-msft,

I've tried your guide.

But your guide picks up my location is it right?

See the picture
I just want to be able to insert an address also the app itself can retrieve the latitudes and longitudes.

Is it possible?

-Peter



v-qiaqi-msft
Community Support
Community Support

Hi@phh,

Combine that with your description, I want to explain something to you:

The BingMaps connector helps to locate, and the Latitude and Longitude is the key to locate your location. The formula I provided directly displays the formatted address which is based on the Latitude and Longitude

Absolutely, the App can retrieve the Latitude and Longitude. You just need to add Two Text columns within your SP list and add it to your EditForm, set the Default property of the TextInput control as below:

 

Location.Latitude & "," & Location.Longitude

 

 

Best Regards,

Qi

hi @v-qiaqi-msft,

It should not be my location but it addresses location.?

-phh

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (91,270)