cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DH1231
Level: Powered On

TextInput with Maximum length doesn't work with value from variable ?

So I created a TextInput with Maximum length 1 and set default:  If( IsBlank(var) ,"",var)

 

It doesnt apply Maximum length: 1 character for  for var 😥

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: TextInput with Maximum length doesn't work with value from variable ?

Oh ok, is that a good enough experience? If a reply in this thread helped you solve the issue, please accept it as the solution.

Thanks,
Hardit Bhatia
https://thepoweraddict.com

View solution in original post

11 REPLIES 11
Super User
Super User

Re: TextInput with Maximum length doesn't work with value from variable ?

So I have a variable that is set as follows:
Set(myVar, "Haman")

I have a text input control where the default is set to:
If(IsBlank(myVar), "", myVar)

And the max length of the text input is set to 1:

It displays the text as "H".

Is that not what you are experiencing?

Let me know if my use case is missing something from yours.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com
WarrenBelz
Level 8

Re: TextInput with Maximum length doesn't work with value from variable ?

Hi @DH1231 ,

How did you set the text length?

Also why not just test var If(Len(var)>1,Notify("Too big") ) or similar

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Super User
Super User

Re: TextInput with Maximum length doesn't work with value from variable ?

@WarrenBelz 

 

I don't think any of this should be necessary though. Here is a working demo: 

Default.gif

 

Let me know if this helps. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

Thanks!
Hardit Bhatia
https://thepoweraddict.com

DH1231
Level: Powered On

Re: TextInput with Maximum length doesn't work with value from variable ?

Not same as your but similar to your case . 

It works only when press F5 to test mode and I  clicked to that InputText ( I set it to view) and then F5 again to developer mode and it jump  to 1 character .

WarrenBelz
Level 8

Re: TextInput with Maximum length doesn't work with value from variable ?

I agree @PowerAddict ,

I posted concurrently with you - that's why I asked the question about the text field.

DH1231
Level: Powered On

Re: TextInput with Maximum length doesn't work with value from variable ?

My Gif

DH1231
Level: Powered On

Re: TextInput with Maximum length doesn't work with value from variable ?

I realized It took 2 ~ 3 second to load it

Super User
Super User

Re: TextInput with Maximum length doesn't work with value from variable ?

I am not sure I completely understood the difference, the GIF was kind of small. What happens when you publish the app? Did you test it by playing the app rather than within the designer?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com
Super User
Super User

Re: TextInput with Maximum length doesn't work with value from variable ?

@WarrenBelz got it, just wanted to make sure I wasn't missing something obvious here.

Thanks,
Hardit

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,504)