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

Check users using PowerApps simultaneously

Is there a way to check who all are currently using a particular PowerApps right now ?

 

Basically I need to show who all are online in that PowerApp so that they can collaborate with each other

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

   Could you tell me:

  • Do you want to create a list in a canvas app to show users who are currently using this app?

   In theory, there is currently no tool that can directly implement this function.My idea is to detect user login and logout time and upload it to a cloud service, so that all users can access the change list, and filter the users who are currently online based on the current time.But there is another difficulty, that is, Canvas app does not support OnEnd event.

   So my final plan is to use a timer to submit the user's current status (email address, current time) every three minutes. Then detect users who are online within three minutes. (You can customize the submission interval and filtering logic).I've made a test for your reference:

1\My data source(SharePoint List)-Online

Title-Single Line of Text

UserEmail-Single Line of Text

LastOnlineTime-Date and Time (Include Time)

1\Add a timer control

AutoStart

true

Duration

180000 /*Loop in 3m*/

OnTimerStart

Set(TheMail,User().Email);
Set(CurrentTime,Now());
If(
   IsBlank(LookUp(OnLine,UserEmail=TheMail)),
   Patch(OnLine,Defaults(OnLine),{Title:Now(),UserEmail:TheMail,LastOnlineTime:Now()}),
   Patch(OnLine,LookUp(OnLine,UserEmail=TheMail),{LastOnlineTime:Now()})
)

 Repeat

true

Visible

false

If your app has multiple screens, I suggest adding the same timer control to each screen.

2\Add a gallery and set it's Items property to

Filter(OnLine,DateDiff(CurrentTime,LastOnlineTime,Minutes)<3 && DateDiff(CurrentTime,LastOnlineTime,Minutes)>-3)

Through this gallery, you can get a list of all users online within 3 minutes.

Best Regards,

Bof

 

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

   Could you tell me:

  • Do you want to create a list in a canvas app to show users who are currently using this app?

   In theory, there is currently no tool that can directly implement this function.My idea is to detect user login and logout time and upload it to a cloud service, so that all users can access the change list, and filter the users who are currently online based on the current time.But there is another difficulty, that is, Canvas app does not support OnEnd event.

   So my final plan is to use a timer to submit the user's current status (email address, current time) every three minutes. Then detect users who are online within three minutes. (You can customize the submission interval and filtering logic).I've made a test for your reference:

1\My data source(SharePoint List)-Online

Title-Single Line of Text

UserEmail-Single Line of Text

LastOnlineTime-Date and Time (Include Time)

1\Add a timer control

AutoStart

true

Duration

180000 /*Loop in 3m*/

OnTimerStart

Set(TheMail,User().Email);
Set(CurrentTime,Now());
If(
   IsBlank(LookUp(OnLine,UserEmail=TheMail)),
   Patch(OnLine,Defaults(OnLine),{Title:Now(),UserEmail:TheMail,LastOnlineTime:Now()}),
   Patch(OnLine,LookUp(OnLine,UserEmail=TheMail),{LastOnlineTime:Now()})
)

 Repeat

true

Visible

false

If your app has multiple screens, I suggest adding the same timer control to each screen.

2\Add a gallery and set it's Items property to

Filter(OnLine,DateDiff(CurrentTime,LastOnlineTime,Minutes)<3 && DateDiff(CurrentTime,LastOnlineTime,Minutes)>-3)

Through this gallery, you can get a list of all users online within 3 minutes.

Best Regards,

Bof

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,428)