cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

UpdateContext Error

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)})

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: UpdateContext Error

@thunter 

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."

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: UpdateContext Error

@thunter 

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."

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: UpdateContext Error

@mdevaney 

 

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

Highlighted
Super User
Super User

Re: UpdateContext Error

@thunter 

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."

Highlighted
Super User
Super User

Re: UpdateContext Error

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,495)