I want to implement a 'New Record' process to my project.
However, this conflicts with various handy features that Servoy provides.
FEATURES
Validation - I have setup validation for corresponding databases and dataproviders. Such that errors are prevented. Such as, having blank values. I then run a 'save revert' to prevent these values from being put onto a record.
AutoSave - In conjunction with validation. Since validation is run on save, if a record fails validation then the record isn't saved despite AutoSave being on thanks to 'save revert'.
However, I encountered some issues with this setup with regards to a new record.
NEW RECORD
A New Record is created entirely blank. And with AutoSave on, this means if you try to edit the record it will freak out due to having so many 'errors' initially.
Thus I created a process that goes like this;
1. Disable Autosave
2. Create New Record
3. (User edits the new blank record)
4. (User does manual save)
After the manual save, autosave is turned back on. This process is to let the user initialize the record by themself. And with the manual save, if they input something wrong the new record won't be jolted back into Autosave mode just yet.
This process makes the most sense to me. However, once I implemented this. I got a bug? Despite having autosave disabled, seemingly for some reason the validation goes off still. Which is good... But the strangest aspect is that when the LAST dataprovider required to be added is left... it will not validate it. It will stay unvalidated despite the data fulfilling the validation. When I try to manually save it still fails. It's like it's getting itself stuck.
QUESTIONS
What is going on with the issue I'm having?
What is the CORRECT way of implementing a new record creation with validation that could conflict with a fresh new record?