PowerApps Exchange

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

Logged in user filter for expenses app from SP

  • 1.  Logged in user filter for expenses app from SP

    Bronze Contributor
    Posted Aug 08, 2019 01:24 AM
    Hi All,

    I did an app from the powerapps template example: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/expense-report-install

    What additionally should I write and there that in landing page users would see only their reports? Logged in user. Currently everyone can see all reports that are created and are in SharePoint site


    Screenshot above comes from the form below. Employee uses Outlook connection.

    Thanks a lot for your time and help!!!

    ------------------------------
    Evelina Kazina
    60063661
    ------------------------------


  • 2.  RE: Logged in user filter for expenses app from SP

    Silver Contributor
    Posted Aug 12, 2019 08:06 AM
    I would think if you add something like
    Set(varUser,User())
    in the App Start then you could add a filter to the gallery so they would only see their reports. Something like:
    Filter(Expenses,Employee.Email = varUser.Mail

    ------------------------------
    Brian Scott
    Chief Creative Officer
    Concord NC
    ------------------------------



  • 3.  RE: Logged in user filter for expenses app from SP

    Bronze Contributor
    Posted Aug 13, 2019 02:55 AM
    I assume Business Trips has teh employees name or Email in a column.  so using one of your collections as an example I would:

    Create an var with user:

    Set(varUser,User().Email)   This is taken from the employee office 365 profile when they log in

    Then
    ClearCollect(OpenReports,Filter('Business Trips',Status = "Open" And Email = varUser) )

    I am using SharePoint List Syntax.


    ------------------------------
    Mark Pearson
    National Operations Manager
    61409321547
    ------------------------------