Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Unique Field question


ittech70
 Share

Recommended Posts

I have set up a database set up where serial numbers are being captured. The numbers are unique, but FileMaker will not allow them to be entered. I have the field set as a text field and unique with no overwrite access. I know I can allow overwrite permissions, but this would compromise the security on the database. Here is an example: Serial number: 911211B00292AB21DQ344692 and serial number 911211B00292AB21DQ340667. Does anyone know if there is a character limit for unique fields?

Link to comment
Share on other sites

I have set up a database set up where serial numbers are being captured. The numbers are unique, but FileMaker will not allow them to be entered. I have the field set as a text field and unique with no overwrite access. I know I can allow overwrite permissions, but this would compromise the security on the database. Here is an example: Serial number: 911211B00292AB21DQ344692 and serial number 911211B00292AB21DQ340667. Does anyone know if there is a character limit for unique fields?

 

Yes, there is a limit - it is 1 billion characters per repetition, per field. So if you have a field with 7 repetitions, it can be 7 billion characters.

 

Field names can only be 100 characters.

 

What are you getting for an error??

Link to comment
Share on other sites

If you notice my example, all characters are the same except the last 4 characters. I get the message that the second number is not unique and won't let me to enter it. It acts like it only reads the first few characters and determines it not to be unique.

Link to comment
Share on other sites

If you notice my example, all characters are the same except the last 4 characters. I get the message that the second number is not unique and won't let me to enter it. It acts like it only reads the first few characters and determines it not to be unique.

 

If I remember rightly, Unique is determined by the indexed items in a field. It used to be 20 characters, but that was long ago. I don't know what the number of characters are, to constitute what is indexed.

 

However, it appears to be a problem.

 

You could break this into 2 fields for entry, concatenating the field in another for display.

Link to comment
Share on other sites

In FM6 and below, there is a index limitation (20 characters per word, I think). If the Unique validation is based on the same thing, that could account for your problem. You might try the validation with a space after the first 20 characters to see if that confirms it. If that works, then the trick would be to get the space in the right place every time. You may have to resort to a script to insert the space and reapply the value.

 

This would be simpler in FM7 and later with the new auto-enter features and filter() function. Of course, if you were using FM7 or later, you wouldn't have the 20 character per word limitation.

Link to comment
Share on other sites

In FM6 and below, there is a index limitation (20 characters per word, I think). If the Unique validation is based on the same thing, that could account for your problem. You might try the validation with a space after the first 20 characters to see if that confirms it. If that works, then the trick would be to get the space in the right place every time. You may have to resort to a script to insert the space and reapply the value.

 

This would be simpler in FM7 and later with the new auto-enter features and filter() function. Of course, if you were using FM7 or later, you wouldn't have the 20 character per word limitation.

 

I think it is 20 characters per field, not per word smiley-frown

 

Either way, a 2 entry field setup, and a 3rd concatenated field, would make it workable. Did concatenation exist in pre-7 (my ignorance showing through smiley-surprised

Link to comment
Share on other sites

You can concatenate fields easily enough (field1 & field2), but how do you do a unique validation for the two fields together??

Link to comment
Share on other sites

You can concatenate fields easily enough (field1 & field2), but how do you do a unique validation for the two fields together??

 

The original poster indicated that only the last few (4) characters were unique - the majority was the same.

 

Make the fields for the piece parts, unique.

Link to comment
Share on other sites

I think it is 20 characters per field, not per word smiley-frown

 

 

Oh Kirk, you made me doubt my memory. I had to go dig out the old FM6. smiley-undecided

 

Alas, I was correct about the indexing by word, and the possible solution of adding a space. But it looks like the maximum word size is 23 characters. the validation fails at 24 characters per word.

 

Here's a sample for those playing along.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.

 Share



×
×
  • Create New...

Important Information

Terms of Use