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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to set validation ...
Power Apps
Answered

How to set validation in field

(0) ShareShare
ReportReport
Posted on by 38

Hi All,

 

I have created a SharePoint list and one of column in it with Security ID and  I want to set a validation for the same as per below example in Power App-

 

1) it should contains 12 character.

2) First 4 character should be first 4 letters of first name. (if first name is less than 4 character than user needs to type "X" to complete 4 characters)

3) middle 4 character should be match with another columns name "Personnel no." last 4 characters

4) last 4 character should be DDMM format. (i.e DD numeric digits should always between 1 to 31 and MM- digits always between 1 to 12")

 

Can anybody suggest me how to set this validation ?

 

 

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Negi1984 ,

     

    Could you please share more details about your scenario? When does the validation work?

     

    If you want to validate the  Security ID before submitting the form, and these columns mentioned above are all in the form, please try with the following logic.

    Len(DataCardValue_SecurityID.Text)=12 
    &&
    Left(DataCardValue_Name.Text&"XXXX",4)=Left(DataCardValue_SecurityID.Text,4)
    &&
    Right(Left(DataCardValue_SecurityID.Text,8),4)=Right(DataCardValue_Personnelno.Text,4)
    &&
    IsMatch(Right(DataCardValue_SecurityID.Text,4),"^([0]?[1-9]|[1|2][0-9]|[3][0|1])([0]?[1-9]|[1][0-2])")

    Snipaste_2020-09-01_17-21-08.png

    Demo:

    GIF_95.gif

    Hope this helps.

    Sik

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard