cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alerts_OM_USA 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
JRaasumaa 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
JRaasumaa 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

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

Anonymous
Not applicable

Re: IsMatch Optional Digits Single Digit Only

That is what I wanted to suggest. Smiley Happy

JRaasumaa 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

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