rlinsurf Posted October 22, 2006 Posted October 22, 2006 Hi-- I have set up several relationships between tables in my file. This is a songwriter's database. The first relationship is between the Songs table and the Discography table. I have added a field to check to see if the relationship comes up with a valid record in the Discography table. If(IsValid(Songs_Film_or_Disc::TITLE);"Yes"; "") However, when I go to a Title in Discography, the field is coming up blank (invalid). I have placed the Title related field from Songs onto the Discography layout, and the Titles match perfectly. I've checked the relationships and they're set to Title (Discography) to Title (Songs) What am I doing wrong? All My Best, Jeffrey
Ender Posted October 22, 2006 Posted October 22, 2006 Try: Case(not IsEmpty(Songs_Film_or_ Disc::TITLE);"Yes")
Steven H. Blackwell Posted October 22, 2006 Posted October 22, 2006 The IsValid function is not designed for the purpose of determining whether or not there are related record in another table. Steven
rlinsurf Posted October 23, 2006 Author Posted October 23, 2006 I did just try IsEmpty and that's giving even more inaccurate information. For example, IsValid keeps saying that "Sweethearts on Parade" is valid, even though it doesn't exist at all in the other table. However, it seems to be one of the few I get that with. But when I switch to IsEmpty, I get lots that don't exist. For example "SWINGIN' ON A RAINBOW" says the other table is not empty of that title, but nothing like it exists. What is the proper way to accurately check for the real existence of related records? Thanks again : All My Best, Jeffrey
Ender Posted October 23, 2006 Posted October 23, 2006 not isempty() is the proper way to test for the existence of related records. Can you post a sample file illustrating the problem?
comment Posted October 23, 2006 Posted October 23, 2006 It sounds like you are interested in testing whether a SPECIFIC record exists in the related table. The test IsEmpty ( RelatedTable::SomeField ) returns true if there is at least one related record AND the field SomeField in the FIRST related record is not empty. To test if there is a related record with specific content in a field, you can define a value list using values from that field (related values only), and check the content against the list. Or, define another relationship that filters based on the specified content in field.
rlinsurf Posted October 23, 2006 Author Posted October 23, 2006 Ah... Looks like I have some experimenting to do All My Best, Jeffrey
Recommended Posts
This topic is 6664 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