using zoho.loginuser to restrict views

using zoho.loginuser to restrict views

I have an application for employee data and am trying to restrict the view so that the logged in user can only view his/her record. I think I've done it fairly simply by doing the following:

  1. Create a field in the employee record called Username and populate this manually with the assigned username
  2. Set the Criteria for the view to Username == zoho.loginuser (I seem to only be able to set this properly by editing the script itself, otherwise Zoho adds " " around zoho.loginuser)
  3. The view then only displays the record(s) for which the logged in user name = the username written in Username field
Does this seem like a safe way to accomplish my goal? I suppose the complication is that I will need to know each employees username in order for it to work properly. So a related question: Is there any way to dictate a username for each user?

Thanks,