Jump to content
  • 0
MelZia

Check for duplicates and present a warning

Question

Hi all, 

I have a user entered field (ABN) which isn't required, but if it IS entered it needs to be a certain format and length and not be a duplicate with any other records.  I was looking for a crafty way to perform a check upon entry (which may involve a check field of some sort?) the use that check to show a warning or stop entry entirely.  Any ideas would be appreciated.    If at all possible I really want to avoid a multi-step process for this check. 

With thanks 

Mel

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
17 hours ago, MelZia said:

but if it IS entered it needs to be a certain format and length and not be a duplicate with any other records.

First thought that came to mind is making that field Unique in the table level. If you do not want any duplicates for that field, checking the 'Unique' box on the table level for that field will prevent the submission automatically when trying to enter a dup. This could be a fairly easy solution.

For the format and length, can you give us the requirements? Is this a text field?

I believe with a combination of using the Unique feature and some simple JS, you can prevent form submission based on your requirements. 

Share this post


Link to post
Share on other sites
  • 0

G'day kpcollier, thanks for the thought.

I started with making it unique in the table design.   But some users won't have this ID number, so I need the capability to leave it blank for some users - hence the unique quality falls over at this point. (to the limit of my knowledge). 

In terms of format is just a 11 digit numerical - which is also easily constrained with table properties and DataPage validation...but once again falls over with allowing it to be left blank in some cases. 

If you have some more detail on how JS might allow both my validated non-dups and blank values I'd like to hear more? 

Mel

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...