cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerStar321
Helper II
Helper II

Disable submit button if an icon is showing a warning

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

5 REPLIES 5
eka24
Super User
Super User

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.

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

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.

Thanks "Super User III"

 

That worked perfectly

PLIVING
Frequent Visitor

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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