cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
yplay27
Helper II
Helper II

Show warning if people picker doesn't match this item

I added an icon and on the visible property I've tried a couple variations on the edit form to get the warning lable to only display when Thisitem.owner (people picker field) does not equal this text box. Any ideas? Here are two separate scripts I tried so far:

ThisItem.Owner <> DataCardValue16_2.SelectedItems.Email

If(ThisItem.Owner in DataCardValue16_2.SelectedItems.Email,false,true) 

yplay27_0-1632938763063.png

Additionally, i tried multiple options for a separate dropdown field  but same thing,  it does not work:

ThisItem.Facility.Id <> DD_Fac_E_1.SelectedText.Result

ThisItem.Facility <> DD_Fac_E_1.SelectedText

ThisItem.Facility.value <> DD_Fac_E_1.Selecteditems.Value

Any help would be greatly appreciated! Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @yplay27,

Could you please tell if you want to achieve this in an Edit Form?

Could you please tell me that if the DataCardValue16_2 allows multi select or single select?

 

If the DataCardValue16_2 only allows single select, please modify you formula as below:

ThisItem.Owner.Email <> DataCardValue16_2.SelectedItems.Email

 

In addition, for another separate dropdown field, the key to solve this issue is how you set the Items property of the DD_Fac_E_1.

If you write a Choices() function, you could refer to: 

ThisItem.Facility.value<>DD_Fac_E_1.Selected.Value

If you write a Distinct() function, you could refer to: 

ThisItem.Facility<>DD_Fac_E_1.Selected.Result

If you write a formula like List.Facility, you could refer to: 

ThisItem.Facility<>DD_Fac_E_1.Selected.Facility​
Best Regards,
Qi

View solution in original post

3 REPLIES 3
AW
Helper II
Helper II

I don't know the full solution, but since the error is on the operator, there could be a discrepancy in the type of data it's comparing. That would depend on the fields' source data. To that point, is the Owner selection an email address (as your formula is comparing to an email)?

v-qiaqi-msft
Community Support
Community Support

Hi @yplay27,

Could you please tell if you want to achieve this in an Edit Form?

Could you please tell me that if the DataCardValue16_2 allows multi select or single select?

 

If the DataCardValue16_2 only allows single select, please modify you formula as below:

ThisItem.Owner.Email <> DataCardValue16_2.SelectedItems.Email

 

In addition, for another separate dropdown field, the key to solve this issue is how you set the Items property of the DD_Fac_E_1.

If you write a Choices() function, you could refer to: 

ThisItem.Facility.value<>DD_Fac_E_1.Selected.Value

If you write a Distinct() function, you could refer to: 

ThisItem.Facility<>DD_Fac_E_1.Selected.Result

If you write a formula like List.Facility, you could refer to: 

ThisItem.Facility<>DD_Fac_E_1.Selected.Facility​
Best Regards,
Qi

thank you i will give these a try although i believe i already attempted these. the owner field is single selection and yes this this an edit form.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,172)