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 / Need help validating a...
Power Apps
Unanswered

Need help validating a Person field in a form

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a Powerapps app that we're using at a tech support bar to check people in as they walk up. This particular screen is pretty simple: they type their name in the "Requester" field, which is tied to a SharePoint list Person column. It looks up their name, and they can select it and submit (see attachment).

 

I have another screen that watches the backing SharePoint list and populates a gallery with the names in the list (it's basically the queue). When someone taps their name in the lookup and submits, it shows up fine in the queue. Here's the issue I'm running into: if someone types their name in, but fails to select their name from the lookup and submits as-is, a blank is stored in the SharePoint list instead of their name.

 

Is there a way that I can validate that field before they submit? I know there are validation techniques in Powerapps, but I'm not sure exactly how to validate that a proper Person was selected before they submit.

 

 

App example.png
Categories:
I have the same question (0)
  • v-sheyu-msft Profile Picture
    Microsoft Employee on at

    hi @Anonymous,

    Can you share a bit more about your issue?

     

    Do you want to validate that field before the field is sumitted?

     

    I made a test.

    7.PNG

     

    Set the visible property of the submit button to:

    If(IsBlank(ComboBox2.Selected.Title),false,true)

    When the field you entry is blank ,the button will not be visible.

     

    regards,

    eason

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi eason!

     

    Thanks for your reply. I can share a bit more about my issue. The problem isn't people leaving that field blank; it's when they type their name and then click Submit without selecting a name from the lookup dropdown. The resulting SharePoint entry has a blank instead of a name. It only populates the SharePoint entry correctly when they select their name from the dropdown. See my original attachment for the lookup dropdown I'm talking about.

     

    Thanks,

    Sean

  • SreeHelper Profile Picture
    16 on at

    Hi,

        Combobox has SearchText property to get the user input. If Combobox.Selected.Name is empty, you can use Combobox.SearchText property to find the username and store in SharePoint.

     

    Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks SreeHelper.

     

    I see a SearchFields property, but not a SearchText one.

  • SaiTeja444 Profile Picture
    8 on at

    Here is the work out for me.
    I have created a collection. For the multiselect people picker field values storing in the collection.
    Now check the collection is empty or not.

    ForAll(

        cbusername.SelectedItems,

        Collect(

            ColPeopleToPatch,

            {

                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

                Claims: "i:0#.f|membership|" & ThisRecord.Mail,

                Department: "",

                DisplayName: ThisRecord.DisplayName,

                Email: ThisRecord.Mail,

                JobTitle: "",

                Picture: ""

            }

        )

    );

    ForAll(

        cbapproversnames.SelectedItems,

        Collect(

            ColApproversPersonsToPatch,

            {

                '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

                Claims: "i:0#.f|membership|" & ThisRecord.Mail,

                Department: "",

                DisplayName: ThisRecord.DisplayName,

                Email: ThisRecord.Mail,

                JobTitle: "",

                Picture: ""

            }

        )

    );

    If(

        IsBlankOrError(ColPeopleToPatch) && IsBlankOrError(ColApproversPersonsToPatch),

        Notify(

            "User validated",

            Information

        ),

        Notify(

            "Not found",

            Information

        )

    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 602

#2
WarrenBelz Profile Picture

WarrenBelz 473 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 310

Last 30 days Overall leaderboard