Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

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

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

 

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,473

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,659

Leaderboard