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

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
Highlighted
Memorable Member
Memorable Member

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
Highlighted
Memorable Member
Memorable Member

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

Advocate IV
Advocate IV

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.

Highlighted
Anonymous
Not applicable

Re: IsMatch Optional Digits Single Digit Only

That is what I wanted to suggest. Smiley Happy

Highlighted
Memorable Member
Memorable Member

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,925)