web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Minium length of 8 number in a datacard field not in textinput field

(0) ShareShare
ReportReport
Posted on by 254

Hello,

I just discoverd that a datacard field is not the same as text input field in many regards.

How can I set the properties of a datacard field value that it has to me a number and only valid when its 8 digits?

If there are not 8 digits there can be a warning or visual remark to correct this.

 

I tried with len function but it never worked out. I hope someone can tell me what and where to put a function in it.

 

Thank you very much in advance. 

Best. 

 

Categories:
I have the same question (0)
  • RiccoHipp1903 Profile Picture
    284 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

     I actually tried it out, and did not have any issues. 

     

    make sure that the Form is in the Editmode.

     

    RiccoHipp1903_0-1651824686873.png

    RiccoHipp1903_1-1651824704540.pngRiccoHipp1903_2-1651824730669.png

     

  • Sher0024 Profile Picture
    30 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

    Are you referring to the Datacard created by a form?

    If so, try using the DataCardValue instead, I think it has the same function to restrict the values as numbers and the length of the characters as well:

    Sher0024_0-1651825925349.png

     




  • Applicable88 Profile Picture
    254 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

    @Sher0024 it has max restriction yes, but how to implement that it needs to be 8 numbers only? There is no defaul minimum characters selection 

  • Applicable88 Profile Picture
    254 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

    @RiccoHipp1903 thats a good indicator if the value does not match 8 numbers. But how to make it with a warning or not even let me submit the form if 8 numbers have not been put in?

  • Verified answer
    RiccoHipp1903 Profile Picture
    284 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

    Instead of setting up the Border you can 

     

    1. Make a little Warning sign next to it like I did that 

    RiccoHipp1903_0-1651839524000.png

    set the Visible property to 

    If(Len(DataCardValue_1.Text)=8,false,true)

    or

    2. set the submit button on the displayMode to disabled as long as the requirements are not set 

    If(Len(DataCardValue_1.Text) = 8, Edit, Disabled)
  • Applicable88 Profile Picture
    254 on at
    Re: Minium length of 8 number in a datacard field not in textinput field

    @RiccoHipp1903 great idea! I tried it out, it works very good. 

    Thank you very much and have a nice weekend.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 663 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 398 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard