Skip to main content
Community site session details

Community site session details

Session Id : zdlihdi0bwH/BDESSNFNv2
Power Apps - Building Power Apps
Answered

how to count screen visible

Like (0) ShareShare
ReportReport
Posted on 7 Dec 2022 08:39:43 by

i have a screen ,when ever user navigate to that screen ,on top of it ,it should display number of view count,

any idea how to do this?

Categories:
  • venky232 Profile Picture
    on 16 Dec 2022 at 06:29:14
    Re: how to count screen visible

    yes i used my table name & cloumn name mentioned in my database excel, i want to record screen visible count, i dont have button to record it.when ever user visit screen it should display Number views on screen

  • Sundeep_Malik Profile Picture
    6,482 on 16 Dec 2022 at 06:17:54
    Re: how to count screen visible

    @venky232 

     

    I hope you are using your columns and list? L1 was my sharepoint list and C1 was the column I was taking value from. I hope you are using yours only. Rest everything looks fine. 

    Probably dont add it on on visible, add it on some kind of button.

  • venky232 Profile Picture
    on 16 Dec 2022 at 05:10:37
    Re: how to count screen visible

    @Sundeep_Malik 

    here instead of button to navigate to screen22, i inserted code in gallery on select  & on next detail screen ,on visible properties i added below code 

    Set(ScreenCount,ScreenCount+1);Patch(L1,LookUp(L1,Title=Gallery6.Selected),{C1:ScreenCount})

    but result count showing same for all records 

    i inserted label in gallery and mention as ThisItem.C1

  • Verified answer
    Sundeep_Malik Profile Picture
    6,482 on 07 Dec 2022 at 09:41:44
    Re: how to count screen visible

    Hey @venky232 

     

    On Screen 1 of the app I have a button, that is Navigating me to Screen 21. Screen 22 is the one I am keeping track of. 

    So, onSelect the button I wrote the formula: 

    Navigate(Screen21);Set(ScreenCount,Value(First(L1).C1))

    Where L1 is my List Name and C1 is the column that will keep track of count for the screen. 

     

    Sundeep_Malik_0-1670405568442.png

    Now I will click on the button and Navigate to Screen 22. 

    On the OnSelect Property:

    Navigate(Screen22);Set(ScreenCount,ScreenCount+1);Patch(L1,LookUp(L1,Title="1"),{C1:ScreenCount})

    This will increase the variable by 1 and also patch the value in sharepoint. 

    Sundeep_Malik_1-1670405889688.png

    Then on Next Screen I have done this:

    On right side I have taken a text label and passed the ScreenCount Variable in it. 

    Sundeep_Malik_2-1670405990748.png

    Then on Screen 23, I have used a back button to go back to Screen 22. This will also increase the count by 1 and also save the value in database.

    Sundeep_Malik_3-1670406096417.png

     

     

    I hope this will help. 🙂

     

  • venky232 Profile Picture
    on 07 Dec 2022 at 09:06:18
    Re: how to count screen visible

    yes mine is 2nd case.

    how to write the code?

  • Sundeep_Malik Profile Picture
    6,482 on 07 Dec 2022 at 08:53:38
    Re: how to count screen visible

    Hey @venky232 

     

    You can make a global variable, and whenever a button is pressed to navigate to that screen, you can increase the value of it by one. Or if there is a back button too, you can add the global variable increment in that too. 

     

    You want the variable to be for a single user, or it should keep the overall count. Like 10 people visited the screen on Day 1. Then 10, and on Day 2 10 more, so 20 now. 

    If its the second case, then you will have to save the value in a Collection or a database. From where it will fetch the value after the app is closed. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete