cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
josh99smith
Level: Powered On

Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Greetings..

 

I have a strange situation I can't seem to figure out.

 

I have a calendar app that allows staff members to record events on a calendar.

 

For some strange reason, it wont allow me to edit the end date, unless I edit the start date as well.

 

If I simply edit the end date, it returns the following error on screen.

 

"an error occurred on the server"

 

When I look into the chrome dev tools logs..I see the following error under the network tab.

 

"Invalid data has been used to update the list item. The field you are trying to update may be read only"

 

Any ideas what may the reason for this?

 

I can confirm that my colmn names are accurate and match.

I am also able to create an item with no problem, this only occurs when I try to edit an item.

 

It feels as if there is some codependency between the start and end date fields, but I cant seem to find the relationship between the two fields. I also must discplose that my Sharepoint list is a calendar list type.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
esoPowerUser
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

I have exactly the same type of error ( server error ) Data Souce: SP Calendar . Custom PowerApp with data source targeted against this. Using Edit Form where item is set based on a Gallery Selected Value. Everytying else works except that I need to adjust both start and end date to avoid the error.  I am not using patch function either just submitForm.  ( which updates dates correctly when I adjust both )  I have tried converting the dates to US and English format, but with no luck. To avoid this error, I am thinking about adding time ( for example a minute ) behind the scenes on the update value to see if this helps. This seems like a bug, however can this be solved with the patch function instead with no errors ? Thanks

View solution in original post

10 REPLIES 10
Dawidvh
Level 10

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Hi @josh99smith

 

If you are referring to chrome dev tools, I can assume that you have not missed anything basic Smiley Happy, but maybe send the patch command that you are using to get a little more context.

 

Community Support Team
Community Support Team

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Hi @josh99smith,

Could you please share a bit more about your app's configuration?

Is the Calendar that you mentioned a SP Calendar list?

 

I have made a test, and the issue is confirmed on my side. The screenshot as below:11.JPG

If I only edit the End Time within the Edit form, and submit the form, the error would show up as you mentioned. But if I edit Start Time and End Time, the error would disappear.

In addition, I have also made a test to save form data into Calendar SP list using Patch function, the error message disappear, but the End Time column value would not be updated.

 

I would post this issue to my product team, if the issue is solved, I would reply here.

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
josh99smith
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

You guys are awesome , I apprecrate you trying to help me.

 

Yes, this is indeed a Sharepoint Calendar List I am trying to write too. I gives me a peice of mind to know im not crazy and someone else was able to reacreate the same problem :)...In the meantime, I have created a workaround.

 

I have a standard sharepoint list I am using as a placeholder for the event data. I then have a Flow that takes the data from the placeholder list and creates the item on my intended calendar list.

josh99smith
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Thank you for the response! I am not using any custom patch commands. This problem seems to exist even when using the default DataCard with no customization. I believe the issues may be rooted in the data source. I am trying to write to a Sharepoint Calendar List. From what I have gathered thus far, there seems to be some compatibility issues between the date fields on a Sharepoint Calendar List and PowerApps. I'm gonna go on a limb and say it may have something to do with how PowerApps is identifying and labeling standardized columns like (Author, Created Date, ect..) vs. how Sharepoint is identifying  those same columns. I know there have been issues with the "Author" and "Created By" fields clashing, perhaps something similar going on here?

esoPowerUser
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

I have exactly the same type of error ( server error ) Data Souce: SP Calendar . Custom PowerApp with data source targeted against this. Using Edit Form where item is set based on a Gallery Selected Value. Everytying else works except that I need to adjust both start and end date to avoid the error.  I am not using patch function either just submitForm.  ( which updates dates correctly when I adjust both )  I have tried converting the dates to US and English format, but with no luck. To avoid this error, I am thinking about adding time ( for example a minute ) behind the scenes on the update value to see if this helps. This seems like a bug, however can this be solved with the patch function instead with no errors ? Thanks

View solution in original post

josh99smith
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Thank you! I have not tried a patch command yet, it would be my first time manually updating a record like that. I will certainly give a try though! Glad to see that its not just me and someone else has seen this issue.

Highlighted
esoPowerUser
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

@josh99smith

Thanks. I would recommend trying out the adding time "hack". ( Of course not ideal , but I need to get things work now ) 

As an developer I am used to do some powerappDates.pngPowerAppsSkjermbilde123.PNGminor "hacks" to get things to work sometimes , this was one of the more strange ones I must admit. It seems adding a second to the selected value makes things work. I cannot be quite sure this works all times, but for me its seems working now most of the time. ( See picture for how I added a second to the selected date and selected hours and selected minutes controls )  The PowerApps team will probably however have more qualified answers than mine, but at least I hope it can help you! If you would guess, it is probably something happening behind the scenes in SharePoint that creates this situation 🙂

josh99smith
Level: Powered On

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

Thanks man! I will definitely give this a try too. Truly appreciate you sharing your experience.
ChadVKealey
Level 10

Re: Start & End Date Field (Won't Update Data Source Unless Both Fields Are Updated)

@v-xida-msft , any update on the resolution of this issue? I had not run into it until today, so didn't realize it would be a problem. While I know how to use Patch and understand that it provides some advantages over the standard form submit function, users shouldn't need to use Patch to make a simple field update work.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,200)