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

Need help validating a Person field in a form

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.

 

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Need help validating a Person field in a form

hi @spsalsm,

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 Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
spsalsm
Level: Powered On

Re: Need help validating a Person field in a form

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
Level: Power Up

Re: Need help validating a Person field in a form

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.

spsalsm
Level: Powered On

Re: Need help validating a Person field in a form

Thanks SreeHelper.

 

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

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 281 members 4,295 guests
Please welcome our newest community members: