Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 9/CuRUY0GnEMzs3A6UmxVU
Power Apps - Building Power Apps
Answered

Change Fill color of items within a dropdown?

Like (0) ShareShare
ReportReport
Posted on 17 Jan 2019 21:36:31 by 704

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?

Categories:
  • v-xida-msft Profile Picture
    on 21 Jan 2019 at 01:19:57
    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,

  • Verified answer
    BrianHFASPS Profile Picture
    704 on 18 Jan 2019 at 16:45:11
    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.

  • v-xida-msft Profile Picture
    on 18 Jan 2019 at 09:23:08
    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,

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started