cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to lookup and return user email property

Hi,

 

I am trying to disable the display properties of a datacard value within a form based on the value of a person field lookup from another datasource - I am trying to use something like: 

 

If(LookUp(CollectionName,ID = Value(RelatedID),Person.Email=MyEmailVariable),Edit,Disabled)

 

But it will not work due to the Person.Email properties returning a table -  It works fine if i am just returning a string value from another field. How can I format this correctly?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about the "Person" field in your another SP List? Is it a Person type field with "Allow Multiple selections" enabled?

 

Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following formula:

If(
   MyEmailVariable in Concat(
                              LookUp(CollectionName, ID = Value(RelatedID)).Person, 
                              Email & ";"
                      ),
   Edit,
   Disabled
)

Note: I assume that the Person field in your another SP List is a Person type column, which enable "Allow Multiple selections" option

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@Anonymous 

It looks like you placement of the right bracket is in the wrong place.

 

If(LookUp(CollectionName,ID = Value(RelatedID),Person.Email)=MyEmailVariable,Edit,Disabled)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Have you tried: 

 

If(MyEmailVariable in LookUp(CollectionName,ID = Value(RelatedID),Person.Email),Edit,Disabled)

 

?

The in operator can look for the value in a one column result set.

 

 

v-xida-msft
Community Support
Community Support

Hi @Anonymous ,

Could you please share a bit more about the "Person" field in your another SP List? Is it a Person type field with "Allow Multiple selections" enabled?

 

Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following formula:

If(
   MyEmailVariable in Concat(
                              LookUp(CollectionName, ID = Value(RelatedID)).Person, 
                              Email & ";"
                      ),
   Edit,
   Disabled
)

Note: I assume that the Person field in your another SP List is a Person type column, which enable "Allow Multiple selections" option

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (3,257)