cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@Eelman ,

 

Sorry to keep bugging you.  I have been working on and off the past two weeks on this project and reviewing your code as reference and I just can't get the results that I am looking for.  I appreciate the snippets of examples you provided me but I just don't see without your collection containing all the days of the month from sharepoint, how I would be able to display a full Calendar like the one below:

 

Cal.JPG

 

Please correct me if I am wrong, but your application would only show dates with delivered meals.  My intention is to show the whole calendar, and display each event within that date.  However I do find your example very valuable in helping me understand each function individually which can help me build the app as a whole.  

 

In your code you showed me -- Gallery 2 Items: Filter('DelMeal Dates',DateDel=ThisItem.DateDel)

I did not know you can filter a column 'DelMeal Dates' vs the actual collection.   And I am not sure where DateDel is from.  Do you mind showing me a snippet of your tree view in the app such as the one below (with all controls expanded):

 

Tree.JPG

 

Thank You very much.

 

 

 

Highlighted
Super User II
Super User II

Re: Help with building a request calendar using sharepoint

@UC3378 

PowerApps has a calendar proforma screen setup like the one you've posted that you could work with to design what you need. To start click New Screen --> Calendar.

 

I've just been messing with this today but it seems that the main collection used throughout this screen is MyCalendarEvents which is created / updated in the OnSelect of the dropdown box (top RH corner). I commented out the ClearCollect(MyCalendarEvents ...) and added my own code of

 

ClearCollect(MyCalendarEvents, Sort('Leave Calendar','Start Time',Descending));

This code pulls through my SP calendar events instead of my Outlook calendar events, as designed by the original code.

 

It is then just a matter of messing with your new collection to build out what you need eg make the calendar full-page, add icons that meet your needs, etc

 

I must say, I'm having a few issues references columns I can see in the collection of events (View --> Collections --> MyCalendarEvents) but it would just be a case of persevering. 

 

Please correct me if I am wrong, but your application would only show dates with delivered meals.  - correct, only shows dates where there is data.

 

Here is the tree of the gallery inside the gallery:

DeliverdMeals_Gallery_Inside_Gallery.jpg

 

Hope this helps.

Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@Eelman ,

 

Thanks for your screen shot.  I did use the outlook calendar app that came with powerapps and I watched a video on youtube to convert that to a SP calendar.  However it only shows the circle for an event.  I'd have to click on the date to show the event on a seperate gallery.  I can do the calendar this way, I thought I could show the SP events under each date.  I'll see if I can find someway to make this happen with collections.  Thanks again for all your help.  

Highlighted
Super User
Super User

Re: Help with building a request calendar using sharepoint

I make it show the details just using a simple LookUp text box and it seems to work fine if you don't want the side gallery. Just run out of room so I've limited the data that shows and put some of it on my ToolTip so they can see more details when they just hover over it. 

Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@rebeccas ,

 

Thanks for the tip.  The lookup function worked for me.  I used it on a label control.  

Now what if I have more then one event for a specific date?  The lookup only finds the first one with the reduction parameter option.  I don't think filter or search has any reduction options, even though it can find multiple records.  

Highlighted
Super User
Super User

Re: Help with building a request calendar using sharepoint

@UC3378 

 

No, not for a label anyhow. You could try a subGallery or maybe a list box for that though. I have tried it in this context but seems logical it could work.

Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@rebeccas ,

 

Thanks, I'll give it a try and get back to you.

Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@Eelman ,

 

I am making progress but I am stuck with filtering the subgallery item (Mainly because my main Gallery items is not a collection, rather hard coded dates).  Referencing your code:

 

Gallery 1 Items: SortByColumns(colDelMealGroup,"DateDel",Descending)

Gallery 2 Items: Filter('DelMeal Dates',DateDel=ThisItem.DateDel)

 

In Gallery 2 Items, is DateDel referencing the DelMeal Dates Table, and ThisItem.DateDel referencing the column in colDelMealGroup?  

 

Thanks

 

 

Highlighted
Super User II
Super User II

Re: Help with building a request calendar using sharepoint

@UC3378 

colDelMealGroup is built using GroupBy which is why it may seem a little confusing, sorry.

 

I think I mentioned earlier I used GroupBy but didn't explain how I did it. Here's the code I use:

// collects latest Meals for LoggedIn Camp, Sorts by date Desc
ClearCollect(colDeliveredMeals,Sort(Filter(DeliveredMeals,CampName=varLoggedInCamp),DateDel,Descending));

// Groups above collection by DateDel, column 'DelMeal Dates' holds the table of the grouped data for Gallery2
ClearCollect(colDelMealGroup,GroupBy(colDeliveredMeals,"DateDel","DelMeal Dates"))

- colDeliveredMeals is a collection made using the logged in Camp / Site

- GroupBy then takes this collection and groups it by DateDel. GroupBy, in this instance, is a collection with 2 columns ie DateDel and the new column "DelMeal Dates". The data type of the column "DelMeal Dates" is a table (see below):

colDelMealGroup.jpg

Selecting a table inside "DelMeal Dates" yields all the data getting referenced which has the same table schema as a SP List, like this:

DelMeal Dates data.jpg

 

Hopefully this gives you all the parts you need? Let me know if I need to explain further.

 

Cheers

 

Highlighted
Helper III
Helper III

Re: Help with building a request calendar using sharepoint

@Eelman ,

 

No you did explain it clearly, I understood your code and logic, I just dont understand the Gallery 2 Item property:  

Filter('DelMeal Dates',DateDel=ThisItem.DateDel)

 

Specifically DateDel=ThisItem.DateDel.

 

I am confused because 'DelMeal Dates' does not have a DateDel column, then what is the DateDel in the Filter referencing?  Then, what is ThisItem.DateDel referencing? 

In other words I am interpreting the filter like so:

 

If DateDel in 'DelMeal Dates' is equal to colDealMealGroup's DateDel (ThisItem.DateDel), then have the rows in 'DelMeal Dates' that match this criteria be available as items for Gallery 2.  I guess I am stuck because I dont see a DateDel in 'DelMeal Dates'.  Or I am just interpreting this incorrectly.  If you can break it down for me that would be helpful. Thanks.  

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,004)