cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Save icon visible only when dropdown selection has changed

I am trying to set the visible variable on an icon to appear only if the selection in a dropdown list is changed. I know it's an "If" statement and the greater than less than expression, I am just not sure how I specify or point out the change. I will then use a Patch statement to save to my SP list. Is this even doable?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

Yes...perfect!

 

So, since your Icon is outside of the Gallery, I would recommend the following:

1) Place a toggle control in your Gallery template (call it tglChanged you can set it to not be visible) and set the Default property to:

ThisItem.CompleteStatus.Value <> yourDropDownControlName.Selected.Value

2) In the Visible property of your Icon outside of the Gallery, set the formula to the following:

CountRows(Filter(yourGalleryName.AllItems, tglChanged.Value))>0

 

You Icon will now be visible if any row dropdown is changed from its original value (as determined in the CompleteStatus column)

 

As always - replace the names in the formula with the names that correspond to your app.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

Can you explain further what you mean by "selection in a dropdown list is changed"? 

Are you stating that someone simply has changed to another selection?

 

If so, then there are a lot of questions about the data that the dropdown came from, but basically this would do what you need on the Visible property of your Icon:

If(dropDownControl.Selected.Value <> whateverTheDefaultOfYourDropdownIs, Edit, Disabled)

This would compare the original value of the dropdown with the current value.  If the two are not the same, then the button would be in Edit mode, otherwise, disabled.

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Save icon visible only when dropdown selection has changed

Thank you. This is the statement I am wanting to use, however the default could be different at any time. There are like 10 options that it could possibly display or choose from.

Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

Yes, but you are interested in knowing if the item has Changed.

What is the dropdown set by?  Is it set by a data field in your datasource?  

If so, then you are just comparing the data field to the current selected value - if different, then it is changed.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Save icon visible only when dropdown selection has changed

Yes, the dropdown is set by a data field in my data source. When pulling up the gallery, it might display any one of 10 options per item in the gallery, so do I need to make 10 different strings?

Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

So please clarify these questions:

1) What is the Default property of the DropDown?

2) Is this Icon you want to set visibility on Outside of your Gallery?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Save icon visible only when dropdown selection has changed

I am sorry if I am not explaining well.

 

1.) Unfortunately there isn't a "Default" value. It could be any one of the options by default, however it can be changed. When it is changed I want the "Save" icon to become visible and then ultimately I will use a patch command to update SP.

 

2.) The icon is in the header near the refresh, sort, and home icons on the same screen

Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

I believe you are misunderstanding the "Default" property that I am referring to.  The Default property sets what value is displayed.  You said what is displayed comes from a data field in your data source/gallery.  Therefore, there is a default value for the Control - what is the formula in the Default property?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Frequent Visitor

Re: Save icon visible only when dropdown selection has changed

Yes I am so sorry, all of the terms are new to me. I am only teaching myself PowerApps for a couple weeks. This is what is in the "Default" value for my Dropdown: ThisItem.CompleteStatus.Value

 

Is that what you are asking me?

Highlighted
Super User III
Super User III

Re: Save icon visible only when dropdown selection has changed

@mcu 

Yes...perfect!

 

So, since your Icon is outside of the Gallery, I would recommend the following:

1) Place a toggle control in your Gallery template (call it tglChanged you can set it to not be visible) and set the Default property to:

ThisItem.CompleteStatus.Value <> yourDropDownControlName.Selected.Value

2) In the Visible property of your Icon outside of the Gallery, set the formula to the following:

CountRows(Filter(yourGalleryName.AllItems, tglChanged.Value))>0

 

You Icon will now be visible if any row dropdown is changed from its original value (as determined in the CompleteStatus column)

 

As always - replace the names in the formula with the names that correspond to your app.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,839)