A simple regular cross-reference on the field could keep track of all values used in that field. Put your logic in the Input Transform. Note that the SSN field in the New Person file follows the same logic you've described (along with other logic too). Check out how it behaves and is accomplished. (Note that the SSN field in the New Person file can be left null if the person entering the information holds the XUSPF200 key.)
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Sent: Sunday, March 05, 2006 9:22 PM To: hardhats-members@lists.sourceforge.net Subject: RE: [Hardhats-members] field uniqueness (key index but null allowed) For each record the field could either have a value or could be empty -- more than one record could have the field empty. If the field has a value the value has to be unique within the other records that have a non-empty value for the field. At 10:28 PM 3/5/2006, Cameron wrote: >Do you mean that only one record would have <null> in the given field? That >is, <null> would be in the set of permitted values in the field and that no >value (including the <null> value) would be repeated in any record? > >You would have to insure uniqueness -before- allowing the record to persist, >so it would need to be a unique, required -identifier- as well (you might >actually have to have "<null>" as an string entry to denote <null> otherwise >as a required identifier FileMan would need to delete the whole record.) > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Dan >Sent: Sunday, March 05, 2006 4:20 PM >To: hardhats-members@lists.sourceforge.net >Subject: [Hardhats-members] field uniqueness (key index but null allowed) > >What's the best way to enforce field uniqueness when the field is allowed >to be null? This should work whether data is being entered manually or by >FileMan APIs (internal value which means input transform isn't >useable). I'm looking for the behavior of a key index but that allows for >null entries. The field is not a .01 field. > >I also need to be able to screen the entry for the field and only accept >those that are in a "pick list". > >I was thinking about using an xref but I wasn't sure when/if I could safely >delete the field's value from within an xref fire (if the field value is >not unique or not in the pick list then it needs to be deleted). ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members