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.
Solved! Go to Solution.
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
Hi @josh99smith
If you are referring to chrome dev tools, I can assume that you have not missed anything basic , but maybe send the patch command that you are using to get a little more context.
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:
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
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.
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?
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
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.
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 minor "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 🙂
@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.