hehe, one of my earliest coding experiences was in the late 70’s - I had a part time job at a Tandy store during the school holidays and I figured out how to program a welcome banner on one of the TRS-80’s on display in the store
I have often thought about ways to delete orphaned records – child records left behind when the main record is deleted. I am going to try and apply this method there – on the child record, set up a relation to the main record, and if the relation is empty, delete the row.
So, in practice, what I found out today by implementing it as a way to delete orphaned records, it doesn’t work very well if you have row owners implemented, as the only records that will be surreptitiously deleted by a user perusing his own records are records that he owns.
So going to have to look further for a solution unless there is a way to tell a relation to ignore ownership.
No, if you have row owners in use, then only the owned rows will be sent to the user’s device and as such, only the rows that are accessible are the only ones that can be deleted.
If glide could ignore row ownership, then it wouldn’t be a very secure security feature, would it.
Remember, the relation is building on the user device, as well as the actions being performed on the user device. For the relation to find matching rows, that data has to be sent to, and exist, on the user device. Circumventing the security of row owners by sending unowned rows to a user device would open you up to a security breach. At that point, you’d be better off just not using row owners in the first place.
Yes, but in this app security is not the issue. Deadbeat users is the issue. I cannot count on someone who’s not even using the app to use this method to delete unused or orphaned rows.
That said, I may re-think my ownership to do what I’ve done in some tables, where I have dual-ownership via the little Google Sheet array trick. That way I can have an admin user owner of all rows and as he uses the app it will do cleanup.
Hi Jeff, in your application, I noticed something odd happened to the formula sin(), cos(), or tan().
Pardon me, I thought it was in degrees, it turned out to be radians.
Yep, it is. I think that’s the default for glide math.