cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CReese
Regular Visitor

Logged in User only able to see their information

I have created an app that tracks time, activities, and projects.  I need help with the following:

 

1. Restricting the browse screen to show only the logged in user information (except for Global Admin - she needs to see all)

2. adding a button (in lieu of the date and time box) that will date and time stamp start and a button that will date and time stamp end

 

TTApp.jpg

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @CReese ,

You have not stated how you determine gblAdmin, but the Gallery I assume you select this item from would have Items something like

Filter(
   ListName,
   gblAdmin || 'Created by'.Email = User().Email
)

and would only show records created by the user unless gblAdmin was set. 

For the second question, you would set a Variable to Now()

UpdateContext({varTimeNow:Now()})

then have the Update of the time card

If(
   Value(varTimeNow)>0,
   varTimeNow,
   WhateverItIsNow
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Kosenurm
Super User
Super User

Consider a Security Role for your app/environment through Azure Portal, and give it group membership to your usual environment's group. 

Thank you so much for your response it is truly helpful.  One last question - do I replace the string on the browsegallery 1 

SortByColumns(Filter([@'WES DTTR Report_1'], StartsWith('Name (Title)', TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

with the string text you provided or should it be somewhere else?

browseandsearch.jpg

The string 

Filter(
   ListName,
   gblAdmin || 'Created by'.Email = User().Email
)

does not work for me.  I am not sure what I am doing wrong or leaving out - it does not allow me to use gblAdmin. 

@CReese ,

I was assuming gblAdmin is a Boolean (true/false) Variable - is this not the case?

No.  gblAdmin is not a Boolean - should I add this?  If so, where?  I am the global admin in the backend. 

@CReese 

Yes - that was your question (except for Global Admin - she needs to see all). I was simply giving you the code , mentioned You have not stated how you determine gblAdmin, and used a Variable name to represent it. So you need to identify this user and set gblAdmin to true if they are logged in.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,933)