You are viewing limited content. For full access, please sign in.

Question

Question

Error message for incorrect data on lookup in Forms

asked on October 16, 2017

Hello,

I thought that this would be an option in forms but it does not look like we can without something custom. 

I'm looking for idea to handle a situation. I have a form that is going to be used to update an email in a SQL DB. I use 2 pieces of data, Last name and ID number for the lookup. The form will then fill in a field with their current email. What I want to happen is that if they typed their id or last name incorrectly, the form would have a message that they mis-typed something. The other thing to consider is that its possible for the lookup to return NULL if they dont have an email on file. Thats why the easy way of adding an error message if the email field is empty wont work. I wish Forms had a feature to give an error if the lookup fails but I don't see anything like that. Any idea of the best way to attack this would be greatly appreciated. Thanks. 

0 0

Replies

replied on October 16, 2017

Hey,

So 2 solutions come to mind.

1) Use a stored procedure/view to populate a different in records without an email. Use javascript to customise the message.

2) Have an extra field hidden and have the lookup populate the ID back to the field. If the field is blank then you know that the record doesn't exist(incorrect input) if it is filled and the email is blank then the record is missing an email. I would probably recommend this method.

 

Hope it helps :)

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.