cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Userlogs

Hello dear ones


How can I see which of the approved users use the app and how often?

 

Do I need an extra login page or can I see it somewhere else through the Powerapps login system?

What is the best way to get the login page.

 

Many thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi MacBek,

 

Firstly create yourself a blank SharePoint List, called "PowerAppsUserLog".  Right now, you can just use the default "title" field to capture the user, and the "created" as your timestamp to keep things really simple. 

 

I dont know why you need to create a login screen as you control who has access to the App with who is shared.  Assuming we are discussing a normal canvas app used by just people within your organisation, then you don'd need this as we will know the logged in user.

 

Within your App, select the "onStart" Property and use Patch(PowerAppsUserLog, Defaults(PowerAppsUserLog), {Title: User().Mail})

 

Of course if you use a different SP list name you'll need to change this.  But this will give you very simply the email of the user when they log into the App.

 

If you wanted different properties, then you can use the  Office365Users connector to get additional properties. 

 

Hope this helps.

View solution in original post

Hi, 

 

If you use the below in the "OnStart" property, and of course update the list and column names accordingly, this should certainly work.  you could probably shorten this, but tried to break it down so you could see what is happening and modify as you require.

 

 

ClearCollect(
    cUserMonitor,
    Filter(
        testList,
        Title = User().Email
    )
);
If(
    CountRows(cUserMonitor) = 0,
    Patch(
        testList,
        Defaults(testList),
        {
            Title: User().Email,
            LastLogin: Now(),
            Count: 1
        }
    ),
    Patch(
        testList,
        LookUp(
            testList,
            Title = User().Email
        ),
        {
            Count: LookUp(
                testList,
                Title = User().Email,
                Count
            ) + 1
        }
    )
)

 

 

Thanks

View solution in original post

11 REPLIES 11
rubin_boer
Super User
Super User

hi @Anonymous i am not aware of any report to the level of who is using the app and how often. Thenalyutics preview allow you to see the use of your pp at an aggregated level.

 

click on your apps ellipsis and select analytics preview

rubin_boer_0-1627761284958.png

 if you want a more detail view you can analyse the data to see how users interact with it using created, created by, modified etc.

 

hope it helps 

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
Anonymous
Not applicable

Ok so I have to create a manual login page and a counter that counts how many times someone has logged in.


Any tips or complete solution ?

Hi,

A simple way to do this would be to create a separate SharePoint list (what whatever your data source is) and then ‘on start’ of the App you could then automatically Patch the user, and time stamp to the newly created list and report on it as you require.  

Anonymous
Not applicable

Hello KennyJ

can you Help me Please 

ok i need a List : with Username and Password and a Table with a Time Stamp (What code do I need to store the data on the list?)

 

then i create a Login Page 

 

 

and then i adjust the OnStart in the App  ? 

 

Sorry I am a newcomer

Hi MacBek,

 

Firstly create yourself a blank SharePoint List, called "PowerAppsUserLog".  Right now, you can just use the default "title" field to capture the user, and the "created" as your timestamp to keep things really simple. 

 

I dont know why you need to create a login screen as you control who has access to the App with who is shared.  Assuming we are discussing a normal canvas app used by just people within your organisation, then you don'd need this as we will know the logged in user.

 

Within your App, select the "onStart" Property and use Patch(PowerAppsUserLog, Defaults(PowerAppsUserLog), {Title: User().Mail})

 

Of course if you use a different SP list name you'll need to change this.  But this will give you very simply the email of the user when they log into the App.

 

If you wanted different properties, then you can use the  Office365Users connector to get additional properties. 

 

Hope this helps.

Anonymous
Not applicable

Hi ...i will check it .... i will give a Feedback 

Anonymous
Not applicable

Hi Kenny

Thank you very much, it works.



 

Anonymous
Not applicable

Hi @KennyJ 

 

one question : 

if I want to have a counter in the table and not always have the name and log time displayed

Macbek_0-1628335120435.png

so it's not always

User 1

User 1

User 3 .....

 

 

But : User / Last Login / 5 (times)

 

Normally I only have to select the table and tell it what to show, but somehow I don't get it right.

Hi, 

 

If you use the below in the "OnStart" property, and of course update the list and column names accordingly, this should certainly work.  you could probably shorten this, but tried to break it down so you could see what is happening and modify as you require.

 

 

ClearCollect(
    cUserMonitor,
    Filter(
        testList,
        Title = User().Email
    )
);
If(
    CountRows(cUserMonitor) = 0,
    Patch(
        testList,
        Defaults(testList),
        {
            Title: User().Email,
            LastLogin: Now(),
            Count: 1
        }
    ),
    Patch(
        testList,
        LookUp(
            testList,
            Title = User().Email
        ),
        {
            Count: LookUp(
                testList,
                Title = User().Email,
                Count
            ) + 1
        }
    )
)

 

 

Thanks

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,659)