Script that creates new record when Guest logs in
I'm building a database for my wife's counseling practice, where confidentiality is paramount. My goals right now is paperless "intake." When my wife hands a new client a laptop/iPad with the login screen pulled up, they will click "Login as Guest."
The Guest account is limited to the "Intake" layout, and can only view the most recent record, thanks to this little expression under Security, which denies access to any record number < the total number of records.
If ( Get ( RecordNumber ) < Get ( TotalRecordCount ) ; 0 ; 1 )
Here's the problem: If the most recent record has the previous intake's information on it, then the new client will be able to see the previous intake, i.e., confidentiality is broken.
Here's what I need: When the client logs in as Guest, the database immediately generates a new record. The client only sees a blank layout, and they proceed to put in their information.
Is there a way to run a script when the Guest (and only the Guest) logs in? And can a script generate a new record?