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

USER INPUT TEXT VALIDATION

Dear Friends,

 

In my PowerApp I have 4 text input fields Baggage Tag Number, Ticket Number, Flight Details, and Time.

However, these fields need to be validated, Ticket Number, Flight Details, and Baggage Tag number have a standard format just like an email address has a standard format. Also, the Time must be entered in 24-hour format.

The user has also requested that the Flight Details, Ticket, and Baggage fields allow the user to enter more than one value.
Below are the standards for Ticket and Baggage Number

Ticket Number standard (Alphanumeric with 13 characters)- AAA1234567890 where AAA is a 3 letter code and the remaining numbers are digits

Baggage Tag Number standard (Alphanumeric with 8 characters) - XX123456 where XX is airline two-letter code

Flight Details standard (FLTNO/DDMM) - FLIGHT NUMBER/CURRENT DATE AND MONTH

 

MyFormMyForm

 

Regards,

Silas

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@silacyro 

You can use the ISMATCH function to detect patterns.  The result will be either true or false.

 

ISMATCH function documentation

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch  

 

 

Ticket Number

IsMatch(TextInput_TicketNumberStandard,
Letter & Letter & Letter & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit)  

 

Baggage Tag

IsMatch(TextInput_BaggageTagStandard,Letter & Letter & Digit & Digit & Digit & Digit & Digit & Digit)  

 

Flight Number

IsMatch(TextInput_FlightNo,
Letter & Letter & Letter & Letter & Letter & "/" & Digit & Digit & Digit & Digit)  

 


---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

5 REPLIES 5
mdevaney
Super User
Super User

@silacyro 

You can use the ISMATCH function to detect patterns.  The result will be either true or false.

 

ISMATCH function documentation

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-ismatch  

 

 

Ticket Number

IsMatch(TextInput_TicketNumberStandard,
Letter & Letter & Letter & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit & Digit)  

 

Baggage Tag

IsMatch(TextInput_BaggageTagStandard,Letter & Letter & Digit & Digit & Digit & Digit & Digit & Digit)  

 

Flight Number

IsMatch(TextInput_FlightNo,
Letter & Letter & Letter & Letter & Letter & "/" & Digit & Digit & Digit & Digit)  

 


---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney 
Thanks for the response, the IsMatch works only if one ticker or baggage number is entered in the text field. However, I want to allow the user to enter more than one ticket or baggage number.

@silacyro 

Suggest you change your app to allow only 1 bag tag per text input field.  I don't believe IsMatch will work in your scenario as is.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."  

alrez
Community Support
Community Support

Hi,

 

Having PowerApps be able to detect a field that is Dynamically long is hard and is not doable using the IsMatch function. It would be better if we could say limit it to one entry per field and add multiple fields for entry but depending on your business requirements that might not be a great option either. This might be a better case for Microsoft Support. I'll include a link below; otherwise if any other communities members might know how to achieve this without IsMatch feel free to chime in.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@alrez 
Is this really an issue for Microsoft Support?  I doubt it. Microsoft Support is for technical problems 😑

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,026)