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 / Display problems in pr...
Power Apps
Unanswered

Display problems in preview mode when an environment variable is used in App OnStart

(0) ShareShare
ReportReport
Posted on by 16

I'm currently in the process of building a template app with custom theming. I created a SharePoint list for this purpose:

FreKatho_10_0-1711704076222.png

 

The Template App is in a Solution and I created an Environment Variable StyleScope for the Column Scope.

I now create all variables for the colors in the OnStart property of the App like this:

 

Set(PrimaryColor1Value, ColorValue(LookUp('MyThemeList', VariableName = "PrimaryColor1Value" And "@[StyleScope]" in Scope).VariableValue));

 

The problem I have is that the app is black in the app editing preview mode. But if I start the app with Play, all colors are displayed correctly.
If I leave out the part of the formula with the environment variable, then the display is also correct in preview mode.

What am I doing wrong?

 

Thanks in advance

 

Categories:
I have the same question (0)

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard