June 17, 200619 yr I'm trying to do a Find script where one of the first steps is to Go to Related Record. If there is a related record, then the script runs fine, but if there is not a related record, then Filemaker seems to ignore the script step entirely and the rest of my script gets hosed. I'm try to get Filemaker to report that there are no related records so that I can take the script down a different path (ie. Show Custom Dialog Box stating "no records found). I've tried using Get ( FoundCount ) and Get ( RequestCount ), but these don't seem to do it. Can anyone suggest a way to have Filemaker report no related records exist? I sure would appreciate any advice anyone might offer. Thanks
June 17, 200619 yr The Count(field) function will do here. Just use the KEY FIELD from the relationship as your "field" parameter.
June 17, 200619 yr Author Thank you very much for this information, IdealData! I really appreciate you taking the time to answer my question. Have a great day... :)
June 17, 200619 yr It will work "Ideal", but not ideally: http://www.nabble.com/Re%3A-Testing-For-The-Existence-Of-Related-Records-p4654755.html --sd
June 17, 200619 yr I second that. Please don't use Count to test for related records. I presented on this at DevCon back in 1999. Use IsEmpty or IsValid.
June 17, 200619 yr Weird... but i was about to overhaul a really long script that relies on this so... rightio.
June 18, 200619 yr You can save typing by using - If(Relation::Link) where "Link" is the relationship key field in the target GTRR table. (I think that came from either Comment or Queue.)
June 21, 200619 yr Author My deep appreciation to everyone's response to this question. You have all been very helpful.
Create an account or sign in to comment