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 Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,905)