I'm trying to write a script that will not allow you to enter the same number in a record.
Are you speaking of a Primary Key?
I have a Product that requires at least 4 "VT" numbers. I have this script:
What are "VT" numbers? Can you provide an example? Are there separate "VT" number fields in a given record?
Any logical comparison will result in the value of 1 (True) or zero. If you add up the comparison bits (+, not &) you will get a non-zero sum (aka True). So,
(x<>y) + (y<>z) + (x<>z)
will result in either a zero (all tests fail - x, y and z are the same number), a one, a two, or a three (all tests pass - x, y and z are unique to each other). Any non-zero result will be seen by FileMaker as True. To be a bit redundant:
If( (x<>y) + (y<>z) + (x<>z); "do this for true"; "do that for false" )
Thanks for looking at this.
The "VT'S are the last part of a Image name.
IE: 971du1234 1234A
Product is 971du1234
Image is 1234A
As mention I may have up to 4 "VT's"
IE: VT, VT1, VT2, VT3
I'm not speaking of "Primary" keys.
I'm trying to create a script for this.
Thanks for this I will see if I can make it work.
1 of 1 people found this helpful
FM has a not equal symbol (≠), also the & symbol is not used as 'and' in calculation, so you need to use the word 'and' instead. The & symbol is used to combined text. Example "First Name "& "Last Name" would return "First Name Last Name".
Example of Calculation :
Product::VT ≠ Product::VT1 and Product::VT ≠ Product::VT2 and Product::VT ≠ Product::VT3 and Product::VT ≠ Product::VT4
Thanks for your help. And too thanks to "Ron" and "David".
All is working for me.