cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zuurg
Resolver I
Resolver I

Highlighting changed Dropdown control on form

I have a multi-form page in my app where the .Unsaved property for the forms has been working flawlessly to change the DisplayMode of the "Save" button (the Save button uses patching instead of a SubmitForm).  When I added a new form to the page that is populated with mostly drop downs, the .Unsaved property is no longer working as expected.  

 

I've read that the .Unsaved property is unreliable, but it's been working properly up until now, so I'd like to identify which of the fields is causing the issue by coloring the text red if the field is different than what was loaded.  On a regular text field, I'm doing this by changing the color property of the label on the card to:

If(ThisItem.'External Impacts Details' <> DataCardValue171.Text, Red)

This works properly.  I'm trying to do it with a dropdown data card (that allows for multiple selection of items) and can't get it to work.  Here's the code:

If(ThisItem.'External Impacts' <> DataCardValue170.SelectedItems, Red)

 The error I'm getting is: Incompatible types for comparison.  These types can't be compared: Table, Table.

I tried adding a .Value at the end of each side of the comparison but that produces the same error. 

 

So my question is: how can I check to see if dropdown selections have changed?  Is there a better way of doing this instead of relying on the .Unsaved property?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@zuurg 

If(
    !(ThisItem.'External Impacts in DataCardValue170.SelectedItems),
    Red,
    White
)

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

@zuurg 

If(
    !(ThisItem.'External Impacts in DataCardValue170.SelectedItems),
    Red,
    White
)
Drrickryp
Super User
Super User

@zuurg 

If this answered your question, please mark it solved so others can find it.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (1,715)