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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,910)