cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to display app control from different users

Dear Community team,

 

I have designed small apps which use to display all the information of staff. However, I want full controls app for only particular user only, the rest of user just only view their information. 

 

I have gone through some discussions which is similar to my question, but I won't get those information.

 

Could anyone help to provide detailed information/clue to resolve it? 


Thanks,

Phearin 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to display app control from different users

Hi @phearin ,

Have you taken a try with the solution I provided above?

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been 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

10 REPLIES 10
Highlighted
Anonymous
Not applicable

Re: How to display app control from different users

Hi @phearin,

 

What is your data source ? 

If it is a Sharepoint List, you must concentrate on your List parameters, that permit to allow users only to read and modify their data.

 

List > Parameters > Advanced parameters > Access on reading and on creation

 

Hope it will help you.

 

Regards,

 

Louis

Highlighted
Helper III
Helper III

Re: How to display app control from different users

Hi @Anonymous ,

 

It is on sharepoint as data source. 

Let me give you an example of the form:

The form contains Edit, Add button and those button I want it to appear for certain user only. All other users will not see those button.

 

Thanks,

Phearin 

Highlighted
Anonymous
Not applicable

Re: How to display app control from different users

Ooooh sorry I didn't understand!

 

For that, you can use Office365Groups.

You create one group Sharepoint called "PermissionGroup" where you put all users who can see those buttons.

Then on the OnStart statement of the app, you put :

If(
    "PermissionGroup" in Office365Groups.ListOwnedGroupsV2().value.displayName;
    Permission = true
)

Then, on each button, you put that .Visible statement :

Permission

Does it help you ? 🙂

 

Regards

Highlighted
Community Support
Community Support

Re: How to display app control from different users

Hi @phearin ,

Do you want to display controls within your app based on specific users?

Could you please share a bit more about the specific/certain users that you mentioned?

 

Based on the needs that you mentioned, I think the Visible property of the control could achieve your needs. I assume that only yourself could see these buttons within your Edit form. I have made a test on my side, please take a try with the following workaround:

Set the Visible property of the specific controls to following:

If(
   User().Email = "Your Email Address",
   true,
   false
)

Or

If(
   User().FullName = "The Display name of your sign in account",
   true,
   false
)

 

In addition, you could also consider save the certain users' display name or email address into a collection within your app. Then you could compare current sign in user's display name or email with the saved collection.

Please set the OnStart property of the App control or the OnVisible property of the first screen of your app to following:

ClearCollect(
CertainUsersEmail,
"User1@email.com",
"User2@email.com",
"User3@email.com"
...
)

Set the Visible property of the specific controls (these buttons you mentioned) to following:

If(
    User().Email in CertainUsersEmail,
    true,
    false
)

Please take a try with above solution, then 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.
Highlighted
Helper III
Helper III

Re: How to display app control from different users

Hi @v-xida-msft ,

 

Yes, you are right. I want to display screen control for specific users. For the screen below, I want to show that all buttons to specific user, for instance, the Add button. However, if you normal user, then you won't able to see that Add button. 

 

Note: I will try your solution to see whether it works in my case. 

 

2019-05-27 15_58_06-Window.png

Highlighted
Community Support
Community Support

Re: How to display app control from different users

Hi @phearin ,

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this threads has been solved.

 

If you have any other questions about PowerApps, please feel free to reply here.

 

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

Re: How to display app control from different users

Hi @phearin ,

Have you taken a try with the solution I provided above?

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been 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

Highlighted
Helper III
Helper III

Re: How to display app control from different users

Hi @v-xida-msft ,

 

I have tried your suggestion, but it seems the button has been disappear when I applied:

 

Visible on add button: If(User().Email in CertainUserEmail,true,false)

on App collection onStart: ClearCollect(CertainUserEmail,"abc@xyz.com") 

 

Thanks,

Phearin 

Highlighted
Helper III
Helper III

Re: How to display app control from different users

Hi @v-xida-msft ,

 

It is working fine with your solution in my case. 

It just need understanding the sensitive case of the function.

 

I have tried this function: If(User().Email = "prey.veng@abc.com", true,false) , it will not work. Unless you use case sensitive with your email. If(User().Email= "Prey.Veng@abc.com",true,false) then it is working in that way.

 

Thanks,

Phearin 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,704)