cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BrianHFASPS
Level 8

Change Fill color of items within a dropdown?

I want to highlight the items of a dropdown based upon a check of another column. I have a dropdown with these items:

Sort(Filter('[dbo].[Activity View]',Trimester='Attendance Trimester Dropdown Roster'.Selected.Trimester),'Activity Name',Ascending)

I wanted to do something like this:

If(LookUp('[dbo].[Activities]',ActivityID='Attendance Class Name Dropdown'.Selected.ActivityID,'AttTakenDate String') = Text(Today(),"[$-en-US]yyyy-mm-dd"), GreenYellow, White)

However I wanted to do for all the items in list independently rather than just the selected one. I can't figure out how to do self refrential link for items in dropdown though. Something like ThisItem in refrencing dropdown items. Is this possible? If not is there some other way to highlight items in dropdown. I am trying to show which have been complete and which haven't. I can't just remove them from list since they may need them. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
BrianHFASPS
Level 8

Re: Change Fill color of items within a dropdown?


@v-xida-msft wrote:

Hi @BrianHFASPS,

Do you want to change Fill color of all items within a Dropdown control?

I have made a test on my side, if you want to change Fill color of all items within a Dropdown control, I afraid that there is no way to achieve your needs in PowerApps currently (could only specify Fill color the selected item).

 


You can easily change the Fill of all items, you just enter the color in Fill setting and it does it. I wanted to change the color of certain items of a Dropdown. The gallery option is messy to replace a simple dropdown control. I just filtered the list to remove them and made a toggle to bring them back if needed. Thanks for your reply.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Change Fill color of items within a dropdown?

Hi @BrianHFASPS,

Do you want to change Fill color of all items within a Dropdown control?

I have made a test on my side, if you want to change Fill color of all items within a Dropdown control, I afraid that there is no way to achieve your needs in PowerApps currently (could only specify Fill color the selected item).

 

As an alternative solution, I think the Gallery control could achieve your needs. On your side, you could consider take a try to list your SQL View records using Gallery control instead of Dropdown control.

I have made a test on my side, please take a try with the following workaround:9.JPG

Set the TemplateFill property of the Gallery to following:

If(
ThisItem.Dept = "PowerApps", RGBA( 127, 255, 212, 1 ),
ThisItem.Dept = "Power BI", RGBA( 165, 42, 42, 1 ),
RGBA( 222, 184, 135, 1 )
)

On your side, please take a try with the following workaround:

Set the Items proeprty of the Gallery to following:

Sort(
Filter('[dbo].[Activity View]', Trimester = 'Attendance Trimester Dropdown Roster'.Selected.Trimester),
'Activity Name',
Ascending
)

Set the TemplateFill property of the Gallery to following:

If(
LookUp('[dbo].[Activities]', ActivityID = ThisItem.ActivityID,'AttTakenDate String') = Text(Today(),"[$-en-US]yyyy-mm-dd"),
Color.GreenYellow,
Color.White
)

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BrianHFASPS
Level 8

Re: Change Fill color of items within a dropdown?


@v-xida-msft wrote:

Hi @BrianHFASPS,

Do you want to change Fill color of all items within a Dropdown control?

I have made a test on my side, if you want to change Fill color of all items within a Dropdown control, I afraid that there is no way to achieve your needs in PowerApps currently (could only specify Fill color the selected item).

 


You can easily change the Fill of all items, you just enter the color in Fill setting and it does it. I wanted to change the color of certain items of a Dropdown. The gallery option is messy to replace a simple dropdown control. I just filtered the list to remove them and made a toggle to bring them back if needed. Thanks for your reply.

View solution in original post

Community Support Team
Community Support Team

Re: Change Fill color of items within a dropdown?

Hi @BrianHFASPS,

Yeah, I understood your issue. If you want to fill the certain items within the Drop down control based on the specific filter condition, I afraid that there is no way to achieve your needs in PowerApps currently.

As an alternative solution, I think the Gallery control could achieve your needs. Please take a try with the alternative solution I provided above, then check if it could achieve your needs.

If you have solved your issue, please go head to click "Accept as solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 204 members 3,705 guests
Please welcome our newest community members: