cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jasmin_Sch
Helper IV
Helper IV

Change color of save button after changes in gallery row

Hi everyone,

 

I created a repeating table using a vertical gallery (datasource=SharePoint list)

 

I save/patch each row with a save button.

 

The color property of my save button:

 

If(ThisItem.IsSelected=true;Red;RGBA(0; 18; 107; 1))

 

But I want it rather to be like “if this item is changed”. After my users have made changes in a row I want the button in this row to turn and stay red until they have clicked the save button so that they don’t forget to save their changes.

 

Is this possible?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Jasmin_Sch 

You will need to establish the logic in your Formula to determine if it is changed or not.

Now, how to put that in is going to be dependent on how you are populating the information in the gallery controls.

 

So for example, if you have an Items property on the Gallery for something like...Filter(yourDataSource, someCriteria)

And, let's just say you have a Title column and in your Gallery there is a TextInput control for changing the Title.  The Default property on it would be ThisItem.Title.

 

Then for your Color property on the Save button.

If(ThisItem.Title <> TextInputForTitle.Text, Red, RGBA(0; 18; 107; 1))

 

You would add into that formula any other column comparisons you need.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

12 REPLIES 12
RandyHayes
Super User
Super User

@Jasmin_Sch 

You will need to establish the logic in your Formula to determine if it is changed or not.

Now, how to put that in is going to be dependent on how you are populating the information in the gallery controls.

 

So for example, if you have an Items property on the Gallery for something like...Filter(yourDataSource, someCriteria)

And, let's just say you have a Title column and in your Gallery there is a TextInput control for changing the Title.  The Default property on it would be ThisItem.Title.

 

Then for your Color property on the Save button.

If(ThisItem.Title <> TextInputForTitle.Text, Red, RGBA(0; 18; 107; 1))

 

You would add into that formula any other column comparisons you need.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes Thank you 😘

@RandyHayes Just one more question.

Regarding my date picker column I am facing some difficulties:

 

ThisItem.LineDeliveryDate<>‘Input Delivery Date‘.SelectedDate

 

An error occurs below „<>“ (type not compatible. Function can not be evaluated)

 

What’s my mistake?

 

Thank you very much!

RandyHayes
Super User
Super User

@Jasmin_Sch 

What kind of column is LineDeliveryDate?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Drrickryp
Super User
Super User

@RandyHayes 

This is the one I recommended using a hidden form with her repeating gallery. She can probably leverage the form unsaved property to control the status of her save button as well as notifications and popup in some of her subsequent questions.

RandyHayes
Super User
Super User

@Drrickryp 

Yes, I recall that post!  That would make sense.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes A date picker column

RandyHayes
Super User
Super User

@Jasmin_Sch 

Go to your formula and put your cursor at these locations:

RandyHayes_0-1618260546759.png

Then in the formula editor see what it is showing for the DataType:

RandyHayes_2-1618260653718.png

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes ThisItem.LineDelivery=Text

Input Delivery Date.Selected Date=DateValue

 

thank you!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,733)