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

Can not edit item in calendar view

Hello,

I have a list of Tasks in SP and i have created a gallery in my main screen to edit those Tasks.

I also created a calendar view screen where i have another gallery to display my Tasks using filters.

The edit button in the first gallery works fine.

When i click edit in the calendar's gallery (i use the same code) it navigates me to the wrong item.

 

8 REPLIES 8
Highlighted
Super User III
Super User III

Re: Can not edit item in calendar view

Hi @marial16 ,

What is the code on both of these items?

Highlighted
Community Support
Community Support

Re: Can not edit item in calendar view

Hi @marial16 ,

Do you mean that you could not navigate to the right edit form by clicking the edit button in calendar gallery?

Could you show me:

1)your calendar gallery's Items?

2)the edit button's OnSelect?

3)the edit form's settings?

I said your list of Tasks is in SP. However, the calendar template screen is for tasks in office365 outllook calendar.

These two are different data sources.

Please notice how does the items in event gallery get in calendar template screen:

Collect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(_myCalendar.Name, Text(_firstDayOfMonth, UTC), Text(_maxDate, UTC)).value))

This operation gets all events (including instances of recurrences) in a calendar using Graph API.

So if you want to update items in this gallery, you should use formula like this to update:

Office365Outlook.V4CalendarPatchItem(Calendar id,Id,Subject,Start time,End time,Time zone)

 

Here's a doc about this connector for your reference:

https://docs.microsoft.com/en-us/connectors/office365/#update-event-(v4)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper V
Helper V

Re: Can not edit item in calendar view

Both edit buttons in my galleries should take me to the edit screen to edit the selected task
EditForm(EditTask);
Navigate(EditTaskScreen);

 

I kept the calendars functionality, however i m a bit confused on the Rectangles On.Select value.

 

bbbbbbbbbbbbbbbbbbbbbbbb.png

Select(Title7)  which i replaced with

Set( _selectedCalendarEvent, ThisItem );

 

In the Title7 field of the calendar's gallery i use ThisItem.Title etc (whatever i use in the main screen's gallery)

 

 

 

Highlighted
Helper V
Helper V

Re: Can not edit item in calendar view

Hallo,

I filter my SharePoint List Tasks by start date so in calendar's Gallery

Items: SortByColumns(Filter(Tasks, Text(Startdate, DateTimeFormat.ShortDate) = Text(_dateSelected, DateTimeFormat.ShortDate)), "Startdate")

 

You could also take a look at my previous reply to @WarrenBelz

 

 

Highlighted
Super User III
Super User III

Re: Can not edit item in calendar view

Hi @marial16 ,

The Select statement does nothing unless you are selecting a control with something else set on its OnSelect property.

The code you have set should set a from to Edit Mode and navigate to a screen (where I assume you have this form).

You mention two buttons that use this code. Where are these buttons situated?

Highlighted
Helper V
Helper V

Re: Can not edit item in calendar view

Seems like i had to duplicate my edit screen.

Since i am using two galleries to edit the same data.

I had to set the Item property accordingly in both cases. And it works like that!

Thank you for your Answer.

Highlighted
Super User III
Super User III

Re: Can not edit item in calendar view

@marial16 ,

There is a better way of doing that (rather than duplicating screens). Set a variable on the OnSelect of each screen

Set(vID, ThisItem.ID);
Navigate(YourEditScreenName)

 Then your Edit form Item

Lookup(
   YourListName,
   ID=vID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Super User III
Super User III

Re: Can not edit item in calendar view

Hi @marial16 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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

Top Solution Authors
Top Kudoed Authors
Users online (6,504)