cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ansrikanth
Level: Powered On

Color Enum

Hi

 

Is there any way I can use the Color Enum of Canvas App as a input property to my control? I saw the Enum type but it seems like I need to define all the values for Enum first which obviously is not a simple job in this case. Is there any solution for this?

 

Thanks

-Srikanth

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft dinusc
Microsoft

Re: Color Enum

That is correct. For now, you could do something like the following:

Capture.PNG

View solution in original post

4 REPLIES 4
Microsoft dinusc
Microsoft

Re: Color Enum

Hello @ansrikanth ,

Unfortunately Canvas Color enums are not supported in PowerApps components. Those are only supported in legacy Canvas controls.

ansrikanth
Level: Powered On

Re: Color Enum

Thank you, so I guess I just need to rely on my component users that they will enter a valid color string (at least for now), no other alternatives. Am I right?
Microsoft dinusc
Microsoft

Re: Color Enum

That is correct. For now, you could do something like the following:

Capture.PNG

View solution in original post

ben-thompson
Level 8

Re: Color Enum

And use a regular expression such as 

/^#([0-9a-f]{3}){1,2}$/i 

to validate that the input is valid before continuing. 

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,091)