cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

IsMatch Optional Digits Single Digit Only

I am trying to use the IsMatch to verify a TextInput of Time. Currently it is

IsMatch( TextInput1_1.Text, OptionalDigits & Digit & ":" & Digit & Digit)

. This is so the user can type in 5:00 and it would work. The problem is that the user can also type in 125:00 or 213455135:00.

Is there a way to just allow a single optional digit?

1 ACCEPTED SOLUTION

Accepted Solutions
JRaasumaa
Level 10

Re: IsMatch Optional Digits Single Digit Only

Could you combine this with the LEFT or RIGHT function and only return a single value to the left of the : sign?

 

https://powerapps.microsoft.com/en-us/tutorials/function-left-mid-right/

 

edit: I ment left/right, sorry

View solution in original post

4 REPLIES 4
JRaasumaa
Level 10

Re: IsMatch Optional Digits Single Digit Only

Could you combine this with the LEFT or RIGHT function and only return a single value to the left of the : sign?

 

https://powerapps.microsoft.com/en-us/tutorials/function-left-mid-right/

 

edit: I ment left/right, sorry

View solution in original post

Re: IsMatch Optional Digits Single Digit Only

Thanks, that worked. I then discovered though I could just set the maxlength of the text input to 5 so the user can't even type in more than that.

Anonymous
Not applicable

Re: IsMatch Optional Digits Single Digit Only

That is what I wanted to suggest. Smiley Happy

JRaasumaa
Level 10

Re: IsMatch Optional Digits Single Digit Only


@Alerts_OM_USA wrote:

Thanks, that worked. I then discovered though I could just set the maxlength of the text input to 5 so the user can't even type in more than that.


 

I didn't know you could do that, great find!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 128 members 5,412 guests
Please welcome our newest community members: