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 / Creating an appointmen...
Power Apps
Suggested Answer

Creating an appointment using a powerapp

(0) ShareShare
ReportReport
Posted on by 209
Hello,
I have a powerapp that creates a reminder for our admin team to carry out a process when a driver leaves our fleet.  At the moment it works as it should, the user presses a button within the powerapp and amongst other things it books a reminder into the users Outlook for 7 days time.  Our process has changed slightly and I need to update the powerapp to reflect this change though i have no idea how to do this.

If a driver leaves at any point in any month there needs to be a reminder set into the users Outlook calendar for the 8th of the following month - any ideas how I will do this ?.  Below is the part of the code that works at the minute and i'm hoping someone can tell me how to edit it to perform the new appointment settings.

Thanks for your help in advance.
 
//Book reminder in for driver deletion
 
Office365Outlook.V3CalendarPostItem(LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,"DELETE DRIVER FROM THE SYSTEM",  
 
DateAdd(Now(), 7 + TimeZoneOffset(),TimeUnit.Days),
 
DateAdd(Now(),7 + TimeZoneOffset(),TimeUnit.Days),
 
   { Importance:"High",
    IsAllDay: false,
    RequiredAttendees:"nichole.bates@stationtaxis.com; michael.grogan@stationtaxis.com",
    Body:"Reminder to delete this driver from the system 7 days after leaving "& Upper(FstName.Text) & " , " & Upper('2ndName'.Text) & " , " & "Badge Number:" & Badge2.Text & " " & BadgeDrvr.Text,
    IsHtml:true});
Categories:
I have the same question (0)
  • Jiis Profile Picture
    254 Moderator on at
    Do you need the reminder to be 8. date in the next month or does it need to be the next 8. date no matter if its this month or the next?
  • Suggested answer
    Jiis Profile Picture
    254 Moderator on at
    Okay if it needs to be the next month 8. date
    Set(NextMonthFirstDay, DateAdd(Today(), 1, TimeUnit.Months) - Day(Today()) + 1);
    
    Set(ReminderDate, DateAdd(NextMonthFirstDay, 7, TimeUnit.Days));
    
    Office365Outlook.V3CalendarPostItem(
        LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,
        "DELETE DRIVER FROM THE SYSTEM",  
        ReminderDate,
        ReminderDate,
        {
            Importance: "High",
            IsAllDay: false,
            RequiredAttendees: "nichole.bates@stationtaxis.com; michael.grogan@stationtaxis.com",
            Body: "Reminder to delete this driver from the system on the 8th of the following month: " & Upper(FstName.Text) & " , " & Upper('2ndName'.Text) & " , Badge Number:" & Badge2.Text & " " & BadgeDrvr.Text,
            IsHtml: true
        }
    );
    
    if it needs to be the next 8.date.
     
    Set(CurrentDate, Today());
    
    Set(CurrentMonth8th, DateValue(Text(Year(CurrentDate)) & "-" & Text(Month(CurrentDate), "00") & "-08"));
    
    If(
        CurrentDate <= CurrentMonth8th, 
        Set(ReminderDate, CurrentMonth8th), 
        Set(ReminderDate, DateAdd(CurrentMonth8th, 1, TimeUnit.Months)) 
    );
    
    Office365Outlook.V3CalendarPostItem(
        LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,
        "DELETE DRIVER FROM THE SYSTEM",  
        ReminderDate,
        ReminderDate,
        {
            Importance: "High",
            IsAllDay: false,
            RequiredAttendees: "nichole.bates@stationtaxis.com; michael.grogan@stationtaxis.com",
            Body: "Reminder to delete this driver from the system on the 8th: " & Upper(FstName.Text) & " , " & Upper('2ndName'.Text) & " , Badge Number:" & Badge2.Text & " " & BadgeDrvr.Text,
            IsHtml: true
        }
    );
     
  • Suggested answer
    abc 123 Profile Picture
    789 Moderator on at
    The hardest part is figuring out when the next 8th is. It could look something like this:
    UpdateContext({dtmToday: Today()});
    UpdateContext({intMonth: Month(dtmToday)});
    UpdateContext({intYearNext: Year(dtmToday)});
     
    If(Day(dtmToday)<=8,
        //Use current month & year
        UpdateContext({intMonthNext: intMonth});
        UpdateContext({intYearNext: Year(dtmToday)});
        ,
        //Need to determine the next 8th.
       
        //Based on current Month, set next month and year
        If(intMonth < 12,
            UpdateContext({intMonthNext: intMonth + 1});
            ,
            UpdateContext({intMonthNext: 1}),
            UpdateContext({intYearNext: intYearNext+1})
        );
     
    );
     
    UpdateContext({dtmNextEight: intYearNext & "-" & intMonthNext & "-08"})
     
    Then, you can graft that into the same structure that you used previously to Post an appointment:
     
    Office365Outlook.V3CalendarPostItem(LookUp(Office365Outlook.CalendarGetTables().value, DisplayName="Calendar").Name,"DO SOMETHING ON THE 8th",  
    dtmNextEighth,
    dtmNextEighth, 
       { Importance:"High",
        IsAllDay: false,
        RequiredAttendees:"nichole.bates@stationtaxis.com; michael.grogan@stationtaxis.com",
        Body:"Reminder to do something on the 8th "& Upper(FstName.Text) & " , " & Upper('2ndName'.Text) & " , " & "Badge Number:" & Badge2.Text & " " & BadgeDrvr.Text,
        IsHtml:true});

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard