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 lookup people p...
Power Apps
Answered

How to lookup people picker column validation in submitform

(0) ShareShare
ReportReport
Posted on by 428

Hi 

My below formula is working fine but i also want to add one more validation for people picker column , so it check if people picker choice exist in SharePoint list it give notification Teammember already exist 

Currently i am check UID which is single line text how to check People picker column as well with UID ?

If(!Form2.Valid, SubmitForm(Form2), If(
!IsBlank(LookUp('SP_List',UID =DataCardValue24.Text)),
Notify("UID already exists in table", NotificationType.Warning),
SubmitForm(Form2);
));

 

 

Categories:
  • Kosenurm Profile Picture
    802 on at

    @Ashok2 

     

    Try First(Filter(If(!Form2.Valid, SubmitForm(Form2), If(
    !IsBlank(LookUp('SP_List',UID =DataCardValue24.Text)),
    Notify("UID already exists in table", NotificationType.Warning),
    SubmitForm(Form2);
    ));

  • Ashok2 Profile Picture
    428 on at

    @Kosenurm 

    I tried below formula to validate both both uid and people picker but however my form get submit and get reset even if my last validation failed  "Team Member already exists in table"

    If(!Form2.Valid, SubmitForm(Form2), If(

         !IsBlank(LookUp('RDI_VOT%20Organization_List',MUID =DataCardValue24.Text)),

         Notify("MUID already exists in table", NotificationType.Error)||!IsBlank(LookUp('RDI_VOT%20Organization_List', DataCardValue23.Selected.Email in 'Team Member'.Email)),

       Notify("Team Member already exists in table", NotificationType.Error),

         SubmitForm(Form2);ResetForm(Form2);

    ));

  • Kosenurm Profile Picture
    802 on at

    Did you try with the First(Filter( pre-statement?

  • Ashok2 Profile Picture
    428 on at

    Getting error if i tried that formula invalid number of arguments received 1 expected 2

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Ashok2,

    Have you solved your problem?

    Do you want to validate the UID and people picker choice?

    Could you please share a bit more about your scenario?

    Actually, I think there is something argument invalid happened to your formula.

    The second If() statement will display a banner message if the condition is true, but it returns a record if the condition is false. Did you notice that the data types of the two arguments are completely different.

    In addition, if you have something validation with your form, what makes no sense is that you use the !Form2.Valid to submit form. This is totally contradictory.

    If you insist on validate both UID and people picker choice, I suggest you consider the Error Message text input within the data card.

    Set the Text property of the Error Message text input as below:

    "Email already exists in table!"

    Set the Visible property of the Error Message text input as below:

    If(
     !(IsEmpty(DataCardValue25.Selected.Email) || IsBlank(DataCardValue25.Selected.Email)),
     CountRows(
     Filter(
     Product,
     DataCardValue25.Selected.Email in Employee.Email
     )
     ) > 0,
     false
    )

    So as the Text property of the Error Message text input corresponding to the UID as below:

    "UID already exists in table"

    So as the Visible property of the Error Message text input corresponding to the UID as below:

    If(
     !IsBlank(
     LookUp(
     Product,
     Title = DataCardValue26.Text
     )
     ),true,false)

    Then Set the OnSelect property of the submit button as below:

    If(
     ErrorMessage27.Visible || ErrorMessage23.Visible,
     Notify(
     "UID or Email exists, please note the error message!",
     NotificationType.Warning
     ),
     SubmitForm(EditForm1)
    )

    Check if this could help you at some degree.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard