web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Map.Select Function pr...
Power Apps
Suggested Answer

Map.Select Function problem

(1) ShareShare
ReportReport
Posted on by 45
I have a label that's text is 
Map1.Selected.Location and it works in edit mode but when I first open the app I get this error: 
Issue 
Name isn't valid. 'Selected' isn't recognized. 
This error appears most commonly when a formula refers to something that no longer exists (for example, a control that you've deleted), 

Once I navigate to the map screen in edit mode the error goes away on it's own and it works how i want it to.  The problem is end users can't use it because they can navigate in edit mode to clear the error.  Any ideas for a fix?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,369 Super User 2025 Season 2 on at
    HI
     
    You need to put an Error Handler around the code, this way, it won't show an error, and should allow them to go there
     
    
    If(!IsBlankOrError(Map1.Selected.Location), Map1.Selected.Location);
     
     
    This way it will check first if its Blank or an error (which you are getting and should)
    If its NOT an error you get the location
    If its an error, it does nothing and leaves the label blank.
     
  • Rolson1 Profile Picture
    45 on at
    Thanks for the suggestion, didn't work.  It still says .selected isn't valid.  All i have to do is navigate to the map screen in edit mode and it clears it up, I don't have to actually select anything.  I've tried putting a variable in the label text and setting the variable with the maps onselect but it gives the same problems.
  • davipilot Profile Picture
    14 on at
    My app has had the Map control included in it for over a year and now recently I am running into the same issue where .Selected returns an error message.
     
    Name isn't valid.  'Selected' isn't recognized.
     
    It has caused part of my app from display data from the map.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard