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?
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,
@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.
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:
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,
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional