simoncpage Posted June 24, 2004 Share Posted June 24, 2004 I have a relationship of files that are related and clicking in between relationships that exist is fine. However if the relationship doesnt exist how can I flag this up and ask the user if they want to create a new related record or add this number to an existing one? Thanks Simon Link to comment Share on other sites More sharing options...
-Queue- Posted June 24, 2004 Share Posted June 24, 2004 Use IsEmpty(rel::serial) to test for non-existence. Link to comment Share on other sites More sharing options...
QuinTech Posted June 24, 2004 Share Posted June 24, 2004 Q, my first guess would have been IsValid(). Is IsEmpty() better? J Link to comment Share on other sites More sharing options...
Fenton Posted June 24, 2004 Share Posted June 24, 2004 Yes. On another list we discussed this. Jimmy Jones of FileMaker Inc. stated that IsEmpty is optimized for this use. IsValid, although it appears to work fine, was never intended to be used for this purpose. Link to comment Share on other sites More sharing options...
QuinTech Posted June 24, 2004 Share Posted June 24, 2004 Really? What is the intended purpose of IsValid, then? It seems like that would be its ONLY purpose! Link to comment Share on other sites More sharing options...
-Queue- Posted June 24, 2004 Share Posted June 24, 2004 From FM 5.5 Help: Description IsValid returns 0 when: Link to comment Share on other sites More sharing options...
QuinTech Posted June 24, 2004 Share Posted June 24, 2004 Wow... i've been using IsValid for the wrong purpose for several years now! Huh. Thanks, guys! Link to comment Share on other sites More sharing options...
Vaughan Posted June 25, 2004 Share Posted June 25, 2004 I've always used Count ( relationship::remotekey ) though I can see how it may be slow if there are a lot of related records. Link to comment Share on other sites More sharing options...
-Queue- Posted June 25, 2004 Share Posted June 25, 2004 I used to use relationship::constant. It would be much faster than Count, but apparently IsEmpty is allegedly even faster. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7105 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now