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

Notifications

Announcements

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
    942 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
    942 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard