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

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 III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

12 REPLIES 12
RandyHayes
Super User III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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 III
Super User III

@Jasmin_Sch 

What kind of column is LineDeliveryDate?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too!
Drrickryp
Super User II
Super User II

@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 III
Super User III

@Drrickryp 

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

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too!

@RandyHayes A date picker column

RandyHayes
Super User III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@RandyHayes ThisItem.LineDelivery=Text

Input Delivery Date.Selected Date=DateValue

 

thank you!!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

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 the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (47,711)