Updating existing record in Add mode
I have a request for functionality and I can't seem to find the solution that I'm looking for. In essence what I want is a single form that will either Add a new record, or update an existing record based on key information entered in field(s) (e.g. First Name, last Name):
My requirements are:
1. I want vistitors to be able to enter their contact information without loging in.
2. I don't want to expose the content information to anyone because, I want to prevent spam via phone/mail/email.
I implemented most of this via ZOHO creator by creating a contact info form.
The form is public.
The view is private so that it is not exposed to just any visitor.
This is great for adding NEW users. However, what if someone wants to update their contact info:
I tried to implement some scripting to check if the record exists, but I could not seem to get it working.
When I check if the record exists on the On Success section, and then update the record, it still creates a new record (although the existing record is updated correctly.)
If I check for the pre-existing user in the On Validate, then it doesn't appear to do the update. If I add the Cancel Submit command, the update doesn't happen either.
Do you have any suggestions to make this work?
Thanks,
Jeff