cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

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
Highlighted
Community Support
Community Support

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
Highlighted
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.

Highlighted
Community Support
Community Support

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

Highlighted
Helper V
Helper V

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! 

Highlighted
Resolver I
Resolver I

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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