PowerApps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
Expand all | Collapse all

Attendance Recording System

  • 1.  Attendance Recording System

    Silver Contributor
    Posted Aug 02, 2019 07:23 AM
    Hi Everyone..

    I am trying to create an app using PowerApps for employees to log their IN/OUT timings.

    Some Backgorund: The employee data exists on our sharepoint site, I know how to connect and get the data inside Power Apps.

    What I am looking to achieve is when employees use their Mobile Phones to log their daily attendance, I want to show only that particular employees data and not show all other employee data to him/her.

    How do I achieve this scenario in Power Apps

    Here is my sample data source..



    ------------------------------
    Zahid Shaikh
    9152245089
    ------------------------------


  • 2.  RE: Attendance Recording System

    Bronze Contributor
    Posted Aug 05, 2019 02:19 AM
    Edited by Django Lohn Aug 05, 2019 02:19 AM
    Make use of the Filter function when showing the items of your source: see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup
    Example: Filter( "Excel Data Connection", Lower("Emp Name")=Lower(User().Email))
    (I added the Lower functions to consider possible capitals)

    I recommend to prevent spaces in naming of table / SharePoint columns. (use EmpName instead of Emp Name to make life in functions and formulas more easy).

    ------------------------------
    Django Lohn
    Microsoft365 Power User and Enthousiast #PowerAddict
    InSpark
    ------------------------------



  • 3.  RE: Attendance Recording System

    Bronze Contributor
    Posted Aug 05, 2019 09:26 AM
    Assuming you're have those events ("clock in" and "clock out") recorded to a list separate from the list of employees (which is how I would do it), your simplest solution is to use Item Level Permissions on the list so that users can only see/edit their own entries. See https://sharepointmaven.com/how-to-enable-item-level-permissions-in-sharepoint/ for details on how to enable that. Note that in this case, if there's someone who needs to see ALL of the items, they'll need elevated permissions to that list ("Manage Lists" or higher; I think there is actually a permission that's called "Override List Level Permissions" or something like that).

    Alternately, you could filter the items based on matching the current user's email ("User().Email" - which is actually the user's UPN) to the 'Created By'.email (or Author.email) of the item. Shane Young has a video covering that here: https://www.youtube.com/watch?v=-VaADTTPYmg


    ------------------------------
    Chad Kealey
    Collaboration Specialist
    Drexel University
    ------------------------------