2

I am trying to set predefined colors in PowerApps using the function Set, however, when I check the variables tab the variable does not have a value (NA).

The syntax on the option OnStart I am using is as follows:

Set(LightOrange, ColorValue("#ee7f00"))

Can anyone help me solve this issue?

Jonathan Budez
  • 226
  • 1
  • 3
  • 12
  • when you go on your screen, in advanced you will see Fill, you can change the color there, it is in RGBA format like RGBA(255, 255, 255, 1) – AnkUser Feb 13 '20 at 15:01
  • The idea is declare the color as a variable, so you only write down the name of the color and avoid writing that code every time, or selecting it from the palet. Thanks – Jonathan Budez Feb 13 '20 at 15:31

1 Answers1

2

Nothing wrong in what you're doing. You cannot see that LightOrange variable value what you're setting in OnStart under Variables area like debug mode.

I'm seeing arunColor variable with No value. enter image description here

I'm assigning #0000ff (Blue) using Set from App OnStart enter image description here

I'm assigning that variable value arunColor as control color Fill enter image description here

I'll use one of these urls to access the App after save & publish.

https://apps.powerapps.com/play/d68b7936-xxxx-xxxx-xxxx-ce064e3f1637
https://apps.powerapps.com/play/d68b7936-xxxx-xxxx-xxxx-ce064e3f1637?tenantId=e485c427-xxxx-xxxx-xxxx-add2e5942a49

Voila! I see the control color changed. enter image description here

Reason:
OnStart is designed to trigger when the app is opened very first time. If you make changes in color, then you have to open the App again to see the changes.