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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change icon color on t...
Power Apps
Answered

Change icon color on text box content modification

(0) ShareShare
ReportReport
Posted on by 2

Hi

I want to change icon color when text box content is changed.

I am using If(IsBlank(ControlName.PropertyName),Red,Green).

However, IsBlank works when textbox is blank.

In my application textbox already has some text and I want to ensure that user press save icon if user modify textbox.


I am unsure of using onChange function for textbox.  Any ideas or suggestions are welcome.

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    Hi @Bradblr2020 ,

    Assuming your text box is displaying content from an existing data source

    If(
     ControlName.PropertyName <> ThisItem.FieldName,
     Red,
     Green
    )

    You could also look at setting a Variable OnChange if this is not the case.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Bradblr2020 Profile Picture
    2 on at

    Hi Warren

    Thanks for your reply.

     

    Following script is giving me error:  The function 'If' has some invalid arguments.

     

    If ((Txtbox_User_Name.Text <> ThisItem.DataTable_User_Full_Name), Red, Green)

     

    I am not using form.

    Textbox Name on Screen --> Txtbox_User_Name

    DataTable_User_Full_Name --> Dataverse column name

    I am using "if" script in Fill property of Icon. 

     

    I may  be doing something wrong here as I dont see anything wrong with your script.

  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    @Bradblr2020 ,

    You have an extra bracket at the start, however what do you have as the Default of the Text Box ?

  • BradAugustene Profile Picture
    71 on at

    Apologies Warren, I made typo error, so it was not working.

    Its working perfectly now.

  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    Hi @BradAugustene ,

    So this is solved now?

  • BradAugustene Profile Picture
    71 on at

    Yes Warren this is solved.

    I am unable to find the link to close this topic and accept your solution.

  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    @BradAugustene ,

    I have now marked it for you

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard