I have an app that has been working fine for months now. Today I noticed it isn't saving new records properly. The configuration for this part of the app is a little complex: a gallery listing items, and a NewForm button, which leads to an EditForm page that just does a SubitForm() to save the data. However the edit form has OnSuccess() code that correctly stores the relational link/ID of the selected gallery item (a workaround I got from here to deal with linking SharePoint lists properly):
Today when trying to save new entries the app isn't storing this linked value properly, after the first entry I make. So, for example, I made one new entry after selecting a gallery item, and that works fine. Then I select a different gallery item, go to the NewForm, put in data, save it, and now it saves the relevant/current Animal_rel value to the prior record in the SharePoint list - not the latest/relevant record, which is left blank. Therefore it seems like the Last() function used in the code above is not returning the actual last record saved, but the one before. However, it is strange that the first new entry I make today works fine (i.e. it is weird that it isn't also trying to save the Animal_rel value to the prior entry in the list).
Nothing has changed in my app recently so it must be due to a backend change on the MS end. Any ideas?
Edit: I realised this could be a '500 item limit' issue with SharePoint lists. The list ID is up to 552 but isn't contiguous, so the list is likely ~500 items big - I couldn't see how to get a count. How can I get around this in this case?