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 / Power apps adding item...
Power Apps
Answered

Power apps adding items to left navigation

(0) ShareShare
ReportReport
Posted on by 32

Im unable to add items to the navigation items in leave request template and also calendar to the leave request template.i need to add calendar and set color codes for some activities on the same template please solve my issue.p

Categories:
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Hi @Sohaibmohammad,
    The templates provided by Power Apps are examples to demonstrate functionality, and the Leave Request template needs some modification before it will suit particular needs. I had a quick look at it and noticed the navigation bars for managers and employees are populated by collections - as you modify the contents of those collections, the navigation bars will reflect the changes.

  • Sohaibmohammad Profile Picture
    32 on at

    Can you please explain me in detail like steps how to edit

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Yes, in the OnStart action for the app, you'll see these ClearCollect functions that establish the left-hand menu items:

     //collection used in the left nav menu
     ClearCollect(EmployeeNavigation,
     {MenuItem: "My Leave Requests"},
     {MenuItem: "My Leave Balance"},
     {MenuItem: "Company Holidays"},
     {MenuItem: "About"},
     {MenuItem: "Log out"}),
    
     //collection used in the left nav menu
     ClearCollect(ManagerNavigation,
     {MenuItem: "Leave Requests"},
     {MenuItem: "Company Holidays"},
     {MenuItem: "About"},
     {MenuItem: "Log out"}),

    You can edit those with additional MenuItem choices, or delete the ones you don't need.

    That said, are you new to Power Apps? Consider a learning path to get you familiar with some of the concepts. From there, you will find lots of answers to specific questions in this community.
    Cheers,
    Bryan

  • Sohaibmohammad Profile Picture
    32 on at

    Thanks for your precious time.

    I have one more question regarding adding of calendar to the screen and adding color codes for particular activities as shown in the attachment below. Please can you help me with that?

    IMG_6018.jpg
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Your screenshot includes a gallery that is shaped to look like a calendar. Each item in the gallery has a label that contains the date, and to generate different colors the Fill property of the label is modified depending on the kind of leave date. It's a clever way to set up a gallery and you'll learn a lot from playing with the different properties and actions to see how they can change.

  • Sohaibmohammad Profile Picture
    32 on at

    Can you please provides steps for the same so that i can understand in a better way

  • BCLS776 Profile Picture
    8,994 Moderator on at

    To make one to play with and learn from, start a new, blank canvas app in Power Apps. Then, select New Screen and choose the Calendar style screen to generate a template like this:

    BCLS776_0-1623175497103.png

    That template pre-builds a bunch of the functionality that makes the calendar gallery work well, which saves time.

     

    The coloring of individual days is handled by modifying the Fill property of the Label that forms the gallery. In the example above, it is called:

    BCLS776_1-1623175931023.png

     

    The Fill property has some pre-populated code that highlights the selected day and grays out days that don't fall within the month:

    /*Fill value changes if the gallery item day = today, or if it lies outside of the current month*/ 
    If(
     /*Date selected is today*/
     DateAdd(_firstDayInView, ThisItem.Value) = Today() && DateAdd(_firstDayInView, ThisItem.Value) = _dateSelected, RGBA(0,0,0,0),
     /*Today when it is not selected*/
     DateAdd(_firstDayInView, ThisItem.Value) = Today(), ColorFade(Subcircle1.Fill, 0.67), 
     /*The day is outside the range of the currently selected month*/
     Abs(Self.Text - ThisItem.Value) > 10,RGBA(200, 200, 200, 0.3), RGBA(0, 0, 0, 0))

     

    Play around with this property to change the colors of specific days, by referring to ThisItem.Value. For example, let's make the 15th day in the series a different color:

    /*Fill value changes if the gallery item day = today, or if it lies outside of the current month*/ 
    If(
     /*Date selected is today*/
     DateAdd(_firstDayInView, ThisItem.Value) = Today() && DateAdd(_firstDayInView, ThisItem.Value) = _dateSelected, RGBA(0,0,0,0),
     /*Today when it is not selected*/
     DateAdd(_firstDayInView, ThisItem.Value) = Today(), ColorFade(Subcircle1.Fill, 0.67), 
     /*The day is outside the range of the currently selected month*/
     Abs(Self.Text - ThisItem.Value) > 10,RGBA(200, 200, 200, 0.3),
     // Make 15th day in series green in color
     ThisItem.Value = 15,Green,
     RGBA(0, 0, 0, 0)) // Default to white for all other days

    which results in a calendar that looks like:

    BCLS776_3-1623176807916.png

     

    This is a pretty trivial example, but the Fill color can be associated with a variable or a collection value, which gives you the ability to control it with some sophisticated logic.

     

    Hope that helps your app-building efforts,
    Bryan

  • Sohaibmohammad Profile Picture
    32 on at

    Hello i have tried the sameway explained by you but it isnt working im getting all

    the errors on the screen when i try to edit it in the collections

  • BCLS776 Profile Picture
    8,994 Moderator on at

    Can you share details on the errors and the collection's code you have edited? 

  • Sohaibmohammad Profile Picture
    32 on at

    Sohaibmohammad_0-1623246656601.png

    Sohaibmohammad_1-1623246729403.png

    here are the screenshots for the same when i am trying to add item

    Screenshot 2021-06-09 192112.png

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard