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 / UpdateContext Error
Power Apps
Unanswered

UpdateContext Error

(0) ShareShare
ReportReport
Posted on by

Trying to build a Bing Map with our office locations. Getting the following error:

'UpdateContext' cannot be used in a property of the app object.

 

Here is my code in the OnStart - UpdateContext({plotPoints: Concat('Office Locations', "&pp=" & Latitude & "," & Longitude & ";" &"26"&";" & Title)})

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    UpdateContext cannot be used in the OnStart property of an app.  Instead, you can put it in the OnVisible property of the screen your app opens to.

     

    The reason is UpdateContext is only available while you are currently on a screen.  When the OnStart code is executed no screen has loaded yet.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    on at

    @mdevaney 

     

    That did work, however, now my map is not pulling the data from my SharePoint list. Any ideas?apimap.png

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    No idea.  I have not used the map control before.  I only knew how to get rid of the error.

     

    Might be a good idea to close this thread and repost as a new problem.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    If you want something in the OnStart property of the app, you can instead use a global variable. Something like this:

    Set(plotPoints, Concat('Office Locations', "&pp=" & Latitude & "," & Longitude & ";" &"26"&";" & Title))

    Just wanted to share another alternative. However, as @mdevaney said, if your problem now is a diff one, it will be best to open a new thread.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard