web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to scale powerapps...
Power Apps
Unanswered

How to scale powerapps to show multiple weeks through buttons

(0) ShareShare
ReportReport
Posted on by 149

I am currently in the process of building a PowerApps where it should be possible to add where you currently are located (Out of Office, working from home or on-site) for the current week. Please see attached image.

 

For only one week (current week), this is pretty manageable to do within a gallery, as I can just hardcode the week days within Dataverse table (e.g., Monday_OoO, Monday_Home, Monday_Site ... Friday_OoO.) and then through buttons, I could then just patch a true/false value to the Dataverse table and visualize them with filled/non-filled button colours.

 

However, the catch here is that I would like to scale this to more weeks than just the current one.
Ideally, I should be able to go as many weeks ahead and add in where I will be working from and obviously with the ability to go back to previous weeks to see where people are located.

 

One thing I had been thinking about was to generate Dataverse Tables through "next week" button, so that it automatically would create a table for each week you click: (Table 1: Current WeekNum, Table 2: Current WeekNum +1 etc.).
I don't think this is best practice and even possible.

 

Is there anyone that has other ideas how I could structure my Dataverse Table so that it could allow my PowerApps to go back and forth to multiple different weeks?

 

Thank you in advance!

 

Rama96x_0-1709713905202.png

 

I have the same question (0)
  • Shashank Bhide Profile Picture
    944 Moderator on at

    Hmm, I think you need a datastructure like this.

     

    1. first using date functions you can generate data for as many weeks as you want.
    2. Then you use Gallery and child gallery component to bind to this data structure.
    3. When you build the datastructure, for each view index, you fill the values for full week, then increment the weekIndex and build the week view again.
    4. When you click the next week button, you set the gallery to show the schedule to next weekIndex
    {
     "myCalendar": {
     "schedule": [
     {
     "nameOfDay": "string",
     "workStatus": [
     {
     "location": "string",
     "workingFromLocation": true
     }
     ],
     "weekindex": 1
     }
     ]
     }
    }

     

  • Rama96x Profile Picture
    149 on at

    Thank you for your response @shashankbhide, though I am not sure if I understand this solution, so please bear with me here:

    - The code you have attached, where would that be implemented? Within PowerApps?
    - How would the structure of the dataverse table look like with your solution?

  • Shashank Bhide Profile Picture
    944 Moderator on at

    So this is how I think it should work.

    1. You don't have a direct data source representing your screen layout.
    2. That's why you've to create an in-memory object first in the desired shape.
    3. You can start with an empty object on the start of the application and then fill it with data by calling powerapps functions.
    4. Finally you can bind the screen layout with this in-memory data object.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard