marta Posted November 1, 2010 Posted November 1, 2010 Hello. This is my first. I hope I have chosen the right forum. I have to related bds. On one, a field called "books", with a title for every register and a "yes/no" in the library field, and a field called "author". On the other bd, I would like to be able to retrieve the list of all the books by the same author for which "yes" is selected. The two bds' relationship is "author id". What I can manage is to retrieve the list of books by the same author, but there seems to be no "yes/no" discrimination. I hope this is not too basic for this forum. Thanks a lot.
comment Posted November 1, 2010 Posted November 1, 2010 (edited) Since you have version 11, you can set up a filtered portal to show only books for which the field = "yes". --- P.S. I assume by "bd" you mean a table? Edited November 1, 2010 by Guest
marta Posted November 1, 2010 Author Posted November 1, 2010 Thank you for your prompt reply. Yes, I mean a table. I had come up with a different solution, I am a very very very new newbye. I am going to try what you suggest. -)
marta Posted November 2, 2010 Author Posted November 2, 2010 Hello. I haven't been able to have the portal work. I have tried something different and very unelegant, but it works... 1) I have created a field called "title in library" in table 1. I don't need it, since I already have the "yes/no" field for each title. What the "title in library" does is create a value I can retrieve from table 2, having a field which works listing "title in library".
comment Posted November 2, 2010 Posted November 2, 2010 I am afraid I didn't understand the method you describe (which one is "table 1"?). Perhaps you should take a look at the attached file. FilteredPortal.zip
marta Posted November 3, 2010 Author Posted November 3, 2010 Thank you for the attached file, Comment! It works very well. What I was trying to explain about my "shortcut": 1) Table Books 2) Table Authors Relationship: author id In 1), many fields with values such as language, title, publishing house..... and one field, the "yes/no" in library (which could also be true/false), that I'll be needing for Table 2) Table 2) Many fields, of which one: titles in library. I create a value in T1: title in library (if "no", then field empty). In T2, calculation for the field: List (T1:title in the library). It's not elegant at all....
comment Posted November 3, 2010 Posted November 3, 2010 This is yet another reason why it's better to use 1/0 for Boolean fields, rather then Yes/No - see: http://fmforums.com/forum/showpost.php?post/228583/ This way you only need to sum the related InLibrary field to show how many titles of an author you have. If you format the calculation field as Boolean, it can show the result as "Yes" (one or more) or "No" (none).
marta Posted November 3, 2010 Author Posted November 3, 2010 Excellent, thank you very much. I'll try. What I would really-really like to do is skip one step and have it all in one calculation, but i can't...
marta Posted November 4, 2010 Author Posted November 4, 2010 Good! I managed to have the filtered portal work. I'm not too happy with the display (I would rather have the records in a dropdown list, so that I could see them all at once instead of having to sroll up and down), but apart from this, it works perfectly. Thank you so much for your help.
marta Posted November 5, 2010 Author Posted November 5, 2010 Yes, that's a solution. Thank you so much!
Recommended Posts
This topic is 5190 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