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 / Global Variables Losin...
Power Apps
Answered

Global Variables Losing Value

(2) ShareShare
ReportReport
Posted on by Microsoft Employee

This one is... a weird one?

 

I use a lot of global variables in my app. Every form's item is set to a global variable which is set on some other screen. These values are always set and never undefined when the user navigates to the forms/screens which use them, so I'm not sure why this error is happening and why it's only half happening.

 

Meaning, the live version of my app is fine. Its forms display the right information and everything is working. But on the edit version, where there are no differences whatsoever from the currently-published one, every form with a global variable as its item has the same error. "Invalid formula. Expected a value compatible with DataSource."

 

This has been happening to me on-and-off over the past few weeks and I don't think I ever actually do anything to fix it, it just sometimes fixes itself or I change a bunch of things enough that I have no idea what I did to make the error go away.

 

So the question is, is this just a PowerApps bug and I shouldn't touch it and let it fix itself, or is this a sign that I should rethink the way my app is working and handling these values, that there's the possibility of the whole app falling apart on its live version without warning?

Categories:
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    This is an editor-only issue that was present in the past - doing anything in the app that affects a formula that sets the global variable will effectively nullify the global variable, this then means the global variable no longer matches the format expected by the datasource.

     

    I've not seen this in a long time so I suspect it is no longer applicable (4 years later), so I will mark this as resolved.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard