Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 44l9qvFnufgH/XStlewWtn
Power Apps - Building Power Apps
Answered

UpdateContext problem

Like (0) ShareShare
ReportReport
Posted on 21 Feb 2021 21:41:21 by 19

I'm a PowerApps rookie and I've searched through previous replies to this but can't seem to find anything that fixes my problem. I have a gallery in screen one with an edit button with onSelect set to

 

UpdateContext({TEST: true})

 

 In another Label inside the gallery and a Label outside of the Gallery I have Text set to

 

TEST

 

I'm just trying to test to make sure the edit button is working. When I try it out I can never get a change.  What am I missing?

Navig8tr_1-1613943577028.png

 


Thank you in advance.

 

Categories:
  • LouisC Profile Picture
    27 on 01 Nov 2023 at 20:52:51
    Re: UpdateContext problem

     

    Just figured this out as well. The ITEM property in the Parent will determine the functionality. So you can fix this by using DisplayMode.New or DisplayMode.View because DisplayMode.Edit will pull the ITEM property from the parent (which means if there is nothing input into the ITEM property then there is nothing to pull and invalidates your UpdateContext.

  • BeerPowerData Profile Picture
    3 on 04 May 2022 at 15:38:45
    Re: UpdateContext problem

    Thank you!! you just saved me a huge headache. This was diving me nuts

  • Community Power Platform Member Profile Picture
    on 22 Feb 2021 at 18:43:58
    Re: UpdateContext problem

    Good spot and I suppose it makes sense as when in View, nothing is active and will not update. Unfortunately must have been that because the button was set to view and not disabled it was still selectable and gave the illusion that it was/should still be doing something.

  • Verified answer
    Navig8tr Profile Picture
    19 on 22 Feb 2021 at 03:26:14
    Re: UpdateContext problem

    Well I finally found the problem. Somehow I changed the DisplayMode of the gallery to view instead of edit. Once I changed it, it worked like a champ.

  • Navig8tr Profile Picture
    19 on 21 Feb 2021 at 23:01:51
    Re: UpdateContext problem

    A little more information. I tried creating a new screen/gallery/button etc.. and I got it to work. The only difference was a used a different data source for the gallery. Both are SharePoint lists and as far as I can tell I have the same permissions for both.

  • Navig8tr Profile Picture
    19 on 21 Feb 2021 at 22:35:58
    Re: UpdateContext problem

    Appreciate the information. Unfortunately I have tried Set() as well and getting the same results. I'll keep digging. Thank you.

  • Community Power Platform Member Profile Picture
    on 21 Feb 2021 at 22:32:57
    Re: UpdateContext problem

    Hi,

    Before clicking the edit button within Gallery using your same above formula:

    HenryARPhillips_0-1613946596300.png

     

    After clicking edit:

    HenryARPhillips_1-1613946618218.png

     

    So not sure what is going on in your app as what you had stated above seems to be doing what you would want to.

     

    Also just remember and also worth trying as a troubleshooting step that if you need to use outside the context of your screen, you can use Global variables. So Set(gblTEST,true) as an example.

     

    HenryARPhillips_2-1613946700507.png

     

    HenryARPhillips_3-1613946719241.png

     

     

    Might also be worth checking which property you are typing TEST into of the control.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard