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 / Disable submit button ...
Power Apps
Answered

Disable submit button if an icon is showing a warning

(0) ShareShare
ReportReport
Posted on by 104

Hi All,

 

I have a Textbox linked to a SharePoint list column. I am trying to disable the submit button if the textbox icon is giving a warning. 

 

Capture1.PNG                 Capture2.PNG

I hope you can help
Colin

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Am assuming you have a validation to show or not to show the warning icon in the Visible property, use this approach:

     

    In the DisplayMode of the submit button;

    If(Icon1.Visible,DisplayMode.Disabled,

    DisplayMode.Edit)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • CU-21081202-4 Profile Picture
    104 on at

    Hi

     

    Sorry I should have added the code to my original question.

     

    The icon.Warning changes colour and turns from a red warning sign to a green tick. The red warning sign shows as soon as you open the submit form.

    ##########################

    on icon:

    If(
    IsMatch(
    DataCardValue4.Text,
    "([A-Za-z]*)"
    ),
    Check,
    Icon.Warning
    )

    ##########################

    On Colour:

    If(
    IsMatch(
    DataCardValue4.Text,
    "([A-Za-z]*)"
    ),
    Green,
    Red
    )

    ##########################

     

    Thanks

    Colin

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    You can make use of the formula you stated:

    If(

    IsMatch(

    DataCardValue4.Text,

    "([A-Za-z]*)"

    ),

    DisplayMode.Edit,

    DisplayMode.Disabled

    )

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • CU-21081202-4 Profile Picture
    104 on at

    Thanks "Super User III"

     

    That worked perfectly

  • PL-18111956-0 Profile Picture
    on at

    Hello, how do I make it check for either the warning icon type (check or warning) or the warning icon color (green or red)?  Mine will be visible either way, so checking for visibility won't work for me.  I want to disable the button if the warning icon type is "warning" or if the icon color is "red".

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard