cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAVIDPOWELL
Impactful Individual
Impactful Individual

textbox display only if conditions met on length of string and character conditions

I have 2  textboxes on a screen

 

i need textbox2 to display based on entry in  textbox2.

 

Conditions:

In textbox1  

if the length of the string  =  5

and

the 4th and 5th character do not end in AA

AND 

the string CAN NOT CONTAINS ALL NUMERICS

 

I NEED THAT STRING DISPLAYED IN TEXTBOX 2

i.e.

AS123  - does not get displayed

12345234 -  does not get displayed

ASDAA  -   does not get displayed

DDDFFE - does not get displayed

12345 -  does not get displayed

 

SDSER -  DOES GET DISPLAYED

AAASA - DOES GET DISPLAYED

DERE3  - DOES get displayed

1234E -  DOES GET DISPLAYED

 

 

Almost got this to work.

If(Len(txt_CustomerNumber_pr1.Text) = 5 && Right(txt_CustomerNumber_pr1.Text, 2) <>"AA"
&& IsMatch(txt_CustomerNumber_pr1.Text, "([A-Za-z]+[0-9]|[0-9]+[A-Za-z])[A-Za-z0-9]*"), txt_CustomerNumber_pr1.Text, "")

 

BUT the IsMatch regix cant contain numeric  

 

 

 

Thanks

Dave

 

2 REPLIES 2
Drrickryp
Super User
Super User

@DAVIDPOWELL 

Aside from your question, you never need an If() in a visible property.  The conditions themselves are either true or false. 

Drrickryp
Super User
Super User

@DAVIDPOWELL 

Aside from your question, you never need an If() in a visible property.  The conditions themselves are either true or false. 

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

Changes to Ideas Coming

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

Top Solution Authors
Top Kudoed Authors
Users online (5,034)