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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / variable not working w...
Power Apps
Answered

variable not working when app is publisehd

(0) ShareShare
ReportReport
Posted on by

I created an app. (which is a little game) There is no data being transferred from PowerApps to another source. I have variables set (both global and context variables.) I have a screen with images on one screen, if I select one it navigates to another screen. On the second screen is a question. I've placed a global variable to the Yes / No buttons to make the image from the first screen not hide if selected.  When I preview the app all works perfectly. I reset all the variables and saved, published then shared the app. Now when I tried to play the game, all the images are hidden. Is there a step I am missing?

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Lisea123 ,

    Do you mean that the images that are related to variables are hidden?

    Could you show me the formulas about the variables and images?

    Please note: the updatacontext is only valid in the current screen. It will be updatacontext when the screen navigate to another. You could pass it by using the Navigate function.

    Here's a doc about it for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext

     

     

    Best regards,

    Community Support Team _ Phoebe Liu

  • LA-07111402-0 Profile Picture
    on at

    on the button of screen 2 I've done OnSelect - set(Bag1View,false) and on the bag of screen 1, I've done Visible - Bag1view
    It works perfectly when I preview the app but when I share and use the link to play the app all the bags on the screen are hidden.  
    Also, I would like the app to keep the last variable result as the game will be played once a day for several days and if they've already selected a bag, then I don't want that bag to show on the next day when they open the app and play again.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard