cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lebunim
Frequent Visitor

Input Text Box force format to..... Football game score....

Hi all, 

 

I'm building a EURO 2020 (2021) prediction contest app, where I want each user to provide exact score for each game. There are 36 games. I can limit input text box to 3 characters..... 

 

X:X example 1:0, but I want users to be forced to use this format avoiding situation where some people will provide score like 1-0 or even 1 0. 

 

Any chance to force format of each input text box to NUMBER ":" NUMBER ? 

 

Please help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

You can on the fill property use either:

If(IsMatch(TextInput2_1.Text, MultipleDigits & ":" & MultipleDigits ),White,Red)
or
If(IsMatch(TextInput2_1.Text, Digit & ":" & Digit ),White,Red)
 
You can also modify it for notification 
------------

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

3 REPLIES 3
Drrickryp
Super User
Super User

Use a Slider control. It will output a number and the user can't screw it up like a textbox.

You can on the fill property use either:

If(IsMatch(TextInput2_1.Text, MultipleDigits & ":" & MultipleDigits ),White,Red)
or
If(IsMatch(TextInput2_1.Text, Digit & ":" & Digit ),White,Red)
 
You can also modify it for notification 
------------

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.
Lebunim
Frequent Visitor

Solution provided by eka24 was pretty decent. I initially used it but then figured that there is still nothing stopping the user to input invalid data type. I ended up splitting the result into two input text boxes. A lot of manual work but I guess provided a solid solution and preventing user to input multiple values or even letters. each input text box is set to Max Length of 1 and Numeric value. Thank You for help!

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

Check out the New Ideas Site

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

Top Solution Authors
Top Kudoed Authors
Users online (3,062)