Skip to main content

Notifications

Power Apps - Error Handling
Suggested answer

Help with button text formula

(2) ShareShare
ReportReport
Posted on by 5
Hi all, 
 
I have spent a significant amount of time (2 weeks) just trying to figure this one out, and I'm going around in circles with Chat GPT, so I'll get straight to the point. 
 
I have a List connected to a dynamic calendar I've built in Power Apps. The calendar is to track Financial Board Reporting key dates so the user knows when Board papers are due. In the list, each item (Board paper) has 3 significant dates we need to track: 
 
Eg.
Title: COO Report
RP review date: 24/01/2025
Paper due date: 28/01/2025
Meeting date: 31/01/2025 
 
The name of the Microsoft list is Board Reporting tracker 2025
 
 
I have successfully built the calendar, where by the Gallery is filtering each of these dates, and putting a button on each one to symbolise that it's filtering correctly. 
 
 
 
The filter for GalleryKeyDates is as follows: 
 
Filter(
    'Board Reporting tracker 2025',
    'Meeting date' = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days) ||
    'RP review date' = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days) ||
    'Paper due date' = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days)
)
 
As you can see, thats all working really well. My issue is getting the text on the button to display. I have tried so many different formulas and nothing works. I basically need each button to display what column it's showing plus the title of the Board pack. For example, for the one on the 24th, I would like it to display COO Report | RP review date and using the same formula for the others. 
 
I seem to be getting an issue with 'ThisItem.Value' on the button. After some lengthy discussions with ChatGPT, I was given the below formula's. None of these work, I keep getting the error that 'ThisItem.Value' isn't recognised. Why would it not be recognised from the GallerKeyDates? Anyway, I've posted a bunch of formulas below that didn't help. It keeps going around in circles and regurgitating the same formulas. I'm starting to think this isn't possible, but surely it is? If anyone could help I would be eternally grateful!!!! 
 
***
If(
    DateValue(ThisItem.'RP review date') = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days),
    ThisItem.Title & " | RP review date",
    If(
        DateValue(ThisItem.'Paper due date') = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days),
        ThisItem.Title & " | Paper due date",
        If(
            DateValue(ThisItem.'Meeting date') = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days),
            ThisItem.Title & " | Meeting date",
            ""
        )
    )
)
***
 
 
 
 
 
  • Suggested answer
    FLMike Profile Picture
    FLMike 27,710 on at
    Help with button text formula
    Hi
     
    Sorry, its not clear are you getting errors or are you just not getting any data?
    What Gallery is that data really a part of, the parent or the Child.
    Another issue, that can happen is, when its a nested gallery it will NOT show you all the values for all columns, its a weird and known long term issue.
     
    You have to essentially create a hack to force it.
     
    So just making sure.

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,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics