Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Help with Power Apps issue

(0) ShareShare
ReportReport
Posted on by 5
Hi there, I'm having an ongoing issue I can't solve using chatGPT, so hoping someone here can point me in the right direction. It might be a long one, but I'll explain it the best I can. 
 
I'm creating a Dynamic Calendar which is linked to a Microsoft List called 'Board Reporting Tracker 2025'. The objective is to have a calendar view that is easy to see key dates for those that work on Board reports for a finance companty. I want the calendar to display buttons on the days that things are due, however there are multiple due dates... ie. RP review date, paper due, meeting date, stakeholder engagement date. All of these dates need to show on the calendar and they will be for 1 item. 
 
I started by following this YouTube video https://www.youtube.com/watch?v=NAEZ4m-EjDA&t=1155s which was super helpful, up until I realised I needed to display different buttons for different types of due dates. This video shows how to display work items with a due date (fine). 
 
This is how it currently looks. As you can see, I have 1 item (Test paper) and it displays the dates when Line 2 Stakeholders need to be engaged (6th), when the test paper is due to RP for review (17th), when the test paper is due for submission (20th) and when the actual meeting isd (24). 
Now, the issue I'm having is that, to display all those buttons, I had to create separate galleries. Not ideal, as I'd rather just have the 1 Gallery under the GalleryCalendarMain which displayed all buttons based on filtered formulas, but I couldn't seem to get that to work. So I created different galleries, all with their own unique buttons.
 
The issue I'm having now, is that I want each of those buttons/labels to be clickable and open up to a form so that the user can edit the dates of the item. For some reason, the Button5 works perfectly. It opens Form7 under EditItemScreen and then I can save the update. But when I copy the OnSelect formula to Label4 and Button6, nothing happens. They dont even become clickable. I'm going around in circles, I'm not sure how to fix this or why the OnSelect formula wont work. 
 
The formula I have to Button5 is 
Set(selectedItem, GalleryRPReviewDate.Selected);
EditForm(Form7);
Navigate(EditItemScreen, ScreenTransition.Fade);
 
Label4 and Button6 is the same, but with it's corresponding Galleries as the Gallery name. But, no action is being taken. Chat GPT was asking me about the Item fomula on GalleryCalendarMain which is 
ForAll(Sequence(42),Value+varCurrentDate-Weekday(varCurrentDate)). 
 
But, if I change this, it stuffs the whole calendar. Would anyone have any idea why the OnSelect properties aren't working on the GalleryMeetingDate and GalleryPaperDue galleries? Or alternatively, is there a way I can just have 1 Gallery under the Main Calendar Gallery that looks up the Microsoft list and creates a different button for each item that falls in the seperate due dates? Hopefully this makes sense?
 
Each of the Gallery items have the following properties: 
Filter('Board Reporting tracker 2025','RP review date'=ThisItem.Value)
Filter('Board Reporting tracker 2025','Meeting date'=ThisItem.Value)
Filter('Board Reporting tracker 2025','Paper due date'=ThisItem.Value)
 
 
Any insight would be great. If you need any further information on any formulas I've used, please let me know and I can copy them across. 
  • CU24101112-0 Profile Picture
    CU24101112-0 5 on at
    Help with Power Apps issue
    So I've got the buttons displaying on the correct days as mentioned in my last reply (thank you thank you), but I'm really having trouble with the text display property. 
     
    AI chat has told me to use the following formulas, but neither are working. I'm not sure if I'm explaining it correctly to the chat. I've also posted another copy of how it's now set up with the Galleries. Ignore Gallery stakeholder, I may end up keeping that as non clickable or incorporate it into the same button later on. 
     
    The formulas I've been told to use on the text property of button 5 are:
     
    FIRST ONE:
    If(
        ThisItem.'RP review date' = GalleryCalendarMain.Selected.DateValue,
        ThisItem.Title & " | RP review date",
        If(
            ThisItem.'Meeting date' = GalleryCalendarMain.Selected.DateValue,
            ThisItem.Title & " | Meeting date",
            If(
                ThisItem.'Paper due date' = GalleryCalendarMain.Selected.DateValue,
                ThisItem.Title & " | Paper due",
                ""
            )
        )
    )
    SECOND ONE:
    If(
        ThisItem.'RP review date' = GalleryCalendarMain.Selected.Value,
        ThisItem.Title & " | RP review date",
        If(
            ThisItem.'Meeting date' = GalleryCalendarMain.Selected.Value,
            ThisItem.Title & " | Meeting date",
            If(
                ThisItem.'Paper due date' = GalleryCalendarMain.Selected.Value,
                ThisItem.Title & " | Paper due",
                ""
            )
        )
    )
     
    I tried changing the 'GalleryCalendarMain to GalleryDisplayItems as I dont think it should read from the main one, but I might be wrong. Neither are working. If you have any idea where I'm going wrong, it would help alot :)
     
     
  • CU24101112-0 Profile Picture
    CU24101112-0 5 on at
    Help with Power Apps issue
    Thanks so much for your detailed response Mark! This is really helpful. I ideally would prefer to have it all in one nested gallery, I just couldn't seem to get the formula right. Its all coming from the same list yes. It looks like this: 
     
     
     
    Filter('Board Reporting tracker 2025',
    'RP review date'=ThisItem.Value Or 
    'Meeting date'=ThisItem.Value Or 
    'Paper due date'=ThisItem.Value
    )
     
    I've just tried this filter and it works perfectly!! Thank you! Now, on the text property of that button, I have the formula 
    ThisItem.Title & " | RP review "
     
    Or is this the text label formula you are referring to? I might give that a go. 
     
    I'll also need to filter the colour of the buttons which I think I can get AI chat to help me with maybe. 
     
    This makes it so much cleaner! I should be able to get each button to be clickable to the edit form screen now! 
     
  • Suggested answer
    Mark Nanneman Profile Picture
    Mark Nanneman 981 on at
    Help with Power Apps issue
    I'd check and see if your nested galleries are overlapping.  Button5 is in the first nested gallery, so if they're all stacked on top of each other in the same place then that's why only that one is selectable. 

    It would be best to come up with a way to combine all your nested galleries into one collection and just use one nested gallery.

    E.g. 
    Filter('Board Reporting tracker 2025',
    'RP review date'=ThisItem.Value Or 
    'Meeting date'=ThisItem.Value Or 
    ​​​​​​​
    'Paper due date'=ThisItem.Value
    )
      

    If each gallery is coming from the same list, which it looks like they are, but just displaying different details or columns, then you could just use one gallery and expressions like IF() or Switch() to decide what data is displayed in the text label and what the button does when clicked.
     
     E.g. you could put a text label in the parent gallery to display "ThisItem.Value" and call it "lbl_date", you could even make it transparent or hiden.  Then in the nested gallery you could put a text label to show what type of item is using logic like:

    If(
    'RP review date'=lbl_date.Text,
    "RP Review Date",
    ​​​​​​​
    'Meeting date'=lbl_date.Text, 
    "Meeting Date",
    ​​​​​​​
    'Paper due date'=lbl_date.Text,
    "Paper Due Date"
    ​​​

    )

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard