cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abd3127
Level 8

Checking if the current logged in user is present in People/Group column of SP List

Hello team

 

 I am having a SP List in which i have a people column is present, which contains multiple users.

Now i want to check if the current logged in user is present in this column.

Filter('Support List', User().Email in Reviewer.Email)

By using this formula i am able to check if the user is present or not.

But what i want to do is change the display mode of a control from edit to disabled or disable to edit 

How can i do this?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Checking if the current logged in user is present in People/Group column of SP List

Hi @abd3127,

 

Do you want to change the mode of the control into edit when the current login user is present in the Person/Group column of your SP list?

Further, could you please share a bit more about your PowerApps app's configuration?

 

I agree with @DavesTechTips's thoght almost, I assume that you want to change the mode of the control into edit when the current login user is present in the Person/Group column of your SP list, please take a try with the following workaround:

  • Set the DisplayMode property of the Control to the following formula:
If(IsEmpty(Filter('Support List', User().Email in Reviewer.Email))=true,DisplayMode.Disabled,DisplayMode.Edit)

More details about the IsEmpty function in PowerApps, please check the following article:

IsEmpty function

 

 

Best regards,

Kris

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

4 REPLIES 4
Super User
Super User

Re: Checking if the current logged in user is present in People/Group column of SP List

Hi @abd3127

 

Nice work.

 

You can specify this formula in the DisplayMode property of the input control.

 

IsEmpty(Filter('Support List', User().Email in Reviewer.Email), DisplayMode.Disabled , DisplayMode.Edit )

Let me know if you don't come right.

Community Support Team
Community Support Team

Re: Checking if the current logged in user is present in People/Group column of SP List

Hi @abd3127,

 

Do you want to change the mode of the control into edit when the current login user is present in the Person/Group column of your SP list?

Further, could you please share a bit more about your PowerApps app's configuration?

 

I agree with @DavesTechTips's thoght almost, I assume that you want to change the mode of the control into edit when the current login user is present in the Person/Group column of your SP list, please take a try with the following workaround:

  • Set the DisplayMode property of the Control to the following formula:
If(IsEmpty(Filter('Support List', User().Email in Reviewer.Email))=true,DisplayMode.Disabled,DisplayMode.Edit)

More details about the IsEmpty function in PowerApps, please check the following article:

IsEmpty function

 

 

Best regards,

Kris

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

CindyZ
Level: Powered On

Re: Checking if the current logged in user is present in People/Group column of SP List

Just to let you know this has been an enormous help to me!   Worked perfectly!  I'd never have figured it out myself! 

FacundoGorla
Level 8

Re: Checking if the current logged in user is present in People/Group column of SP List

Hi! I'm having a similar issue but I want to set the control on Edit when the user using the list form is a member of an specific O365 group. 

 

I'm using the Azure AD connector but I can't seems to figure out how to use it's functions to make this work.

 

If("3a0e0fa1-285a-4b6d-91e3-3dd5cd38a5ee" in AzureAD.CheckMemberGroups(UsuariosdeOffice365.MyProfile().Id;
        Table({Value: "3a0e0fa1-285a-4b6d-91e3-3dd5cd38a5ee"}));
        Set(VarAsignadora; "Jefe")

        )

Was using that on the OnEdit property and worked but in the dispplaymode value of a button it doesnt't

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,360)