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

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 News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,597)