web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change color of save b...
Power Apps
Answered

Change color of save button after changes in gallery row

(0) ShareShare
ReportReport
Posted on by 149

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!

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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.

     

  • Jasmin_Sch Profile Picture
    149 on at

    @RandyHayes Thank you 😘

  • Jasmin_Sch Profile Picture
    149 on at

    @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 Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Jasmin_Sch 

    What kind of column is LineDeliveryDate?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @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 Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Drrickryp 

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

  • Jasmin_Sch Profile Picture
    149 on at

    @RandyHayes A date picker column

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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

     

  • Jasmin_Sch Profile Picture
    149 on at

    @RandyHayes ThisItem.LineDelivery=Text

    Input Delivery Date.Selected Date=DateValue

     

    thank you!!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Jasmin_Sch 

    So there it is...they are not the same type and thus cannot be compared without conversion.

    If LineDelievery is a Text value, what format is the date stored in that column?  In other words, is it ShortDate, LongDate, ShortDateTime, etc?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard