Fortunately, the knack team were very helpful in getting the object restored from backup and all was not lost.
A quick update on where it ended up:
I believe the issue may have been caused by me using more than one browser / pc - although this is not certain.
By default, the role inherits from the user - Name, Email, Password and also includes Roles.
I was able to add other fields without issue. I had added a dozen or so fields in PC 1 and continued building the app referencing these fields.
I think when your are in the builder, knack must load the standard fields, followed by the custom fields in quick succession and present as a single list of fields.
Some weeks later when the issue occured, I logged on to knack builder using PC 2 and at the beginning of the session renamed the role e.g from "Leader" to "Manager".
Then I noted the app no longer worked and all the fields were gone from Manager.
I think what may have happened (but I'm not sure) is as follows:
- The custom fields may not have fully rendered in the browser (i.e just the standard fields) when the rename Role request was sent from the browser to Knack. This overwrote what was there as well as renaming the role - leaving just Name, Email Password.
I've renamed tables many times and never had issue, but this has happened on two occasions with user roles and so I think it has something to do with roles having standard + customer fields fields - where as other tables consist of all customer fields.
Anyway, I don't know if it is a bug with Knack per se.
I've got say I'm very happy with Knack and the support provided by the team.
I'm now very careful about making changes to the user roles when the app is at an advanced stage...The following has worked so far: If not using my primary PC, I empty my browser cache and reload the builder making sure all the expected fields are there before adding fields to the role or renaming the role.