nlo Posted June 26, 2003 Posted June 26, 2003 Hi all I am looking for a solution to the following problem. I have two related files, equipment.fp5 and glossary.fp5. glossary.fp5 has 2 fiels named "term" and "description" equipment.fp5 has a scrolling text field named "characteristics" that contains 5 to 10 lines of text.In that text there are 2 to 5 words, styled bold, on which I need to click over and to get (in a portal?) their description from glossary.fp5. Does anybody knows how can I do that? Thanks in advance...
nlo Posted June 26, 2003 Author Posted June 26, 2003 something like that. this is for an educational project, with a lot of new terms for the users. I have to give the user the ability to look for the meaning of any new term he needs... any ideas?
Fenton Posted June 26, 2003 Posted June 26, 2003 I think it will very difficult to do this like a web page. FileMaker does not have that kind of hypertext ability. Web browsers do, but they are specially built for that purpose. Web browsers are not really databases either; it cuts both ways. We often expect every program to have all the best qualities of others, but currently that is not the way it is. So, how to do it in FileMaker. You have a list of all the terms, in the Glossary file. What you could do is to show a list of the words from the Glossary file which are in the current Description field.* This list could show in a little portal off to the side. AFAIK, that's the only way you're going to be able to click on them. There could be another "blank" area somewhere near that could show the longer definition; once you'd clicked a term, setting it into a global which would match the term in Glossary, allowing its related definition to show. *To get the list of terms: The relationship from Equipment to Glossary is many-to-many. You will need to set the terms with a script, which would have to run each time a new term is added to Glossary; but run at first as a Loop through all Glossary records. A relationship from Term (Glossary) to Description (Equip) would isolate all records having that Term. The term would then be added to a multi-line text field in each, say Terms (Equip).The Terms field would be set to itself and a carriage return, then the current Term (temporarily held in a global in Equip). A Loop in the Glossary file would control the process. The multi-line Terms field has the relevant terms; but they need to be "clickable." Relate Terms back to the Term field (Glossary). Base a Portal on that. Now you can click them, and set one into a global, which is also related to Terms (Glossary). The Definition could show as a related field (since only 1 is viewed at a time). It sounds awful, and is hard to explain. But it would go fairly quickly; almost instantaneous to set 1 new term. Do all the above on Form view layouts; Freeze the window; lists are deadly slow for loops. It's also possible that the Troi Text plug-in could help do something like this. But you've got to get the relevant terms into a portal. FileMaker doesn't know where you are in a text field. Perhaps someone has a better idea :-|
Fenton Posted June 26, 2003 Posted June 26, 2003 I wrote: "A relationship from Term (Glossary) to Description (Equip) would isolate all records having that Term." Duh. This would have to be a Find, in the Description field of the Equip file, for the Term, which would be in a global. Then a Loop to set the term into the multi-line(s). It would still be pretty quick. A relationship wouldn't work here. I shouldn't write when I have a headache. It makes me sloppy :-|
ernst Posted June 26, 2003 Posted June 26, 2003 Hi, I don't think you can do that without going through an awful lot of workarounds. Regards, Ernst. Follow up, Just posted my very short reply after thinking some time about it. Saw the long answer Fenton had written. His conclusion sounds sort of the same as mine, I think... Regards, Ernst.
Fenton Posted June 26, 2003 Posted June 26, 2003 Yes, not so easy. My previous post was mostly dealing with implementing into an existing file. I addressed the issue of new Terms (Glossary file), but not really the issue of new records in the Equip file. This would need a similar but different mechanism. Rather than a Find, it would have to Loop through all the terms (in Glossary), and use PatternCount to see if each was in the new Description field. The speed depends a great deal on the size of the Glossary file; and good scripting of the Loop. Here's a simple way to do sort of what you want. Forget the multi-line field. Just put the global Term field on the layout. Tell them to drag a word into it, to see if it has a definition. Just a relationship to the Terms field in Glossary is all you need. They need to have "enable drag and drop text selection" checked in Application Preferences.
nlo Posted June 27, 2003 Author Posted June 27, 2003 Thanks for your replies Last night, i used portals to approximate the solution. This is what i did and why. Because this is an educational project, at least 2 people will use it: a "teacher" (also responsible to populate the database) and a "student". The relation i had was based on the "eq_id" (equipment.fp5) and "term_id" (glossary.fp5) fields. Now,i added the field "eq_term" in glossary.fp5 and created a new relation based on "eq_id" (equipment.fp5) and "eq_term" (glossary.fp5) fields. In the "teacher intro" layout of equipment.fp5, added a portal that displays the "term" and "description" fields from glossary.fp5.That way the teacher can add the text for a new equipment and through the portal can add the related records (term and description) in glossary.fp5. Also the student can see all the relative terms for the equipment he examins in his own layout, without having to click anywhere. This solution seems to work fine with my test data, but I dont know if it will perform well when the data entry will be populated (estimation : 5000 records in equipment.fp5). Another point is that i have to find how to avoid duplicate records in glossary.fp5 (terms that are relative with more than one equipment entries), even if these entries will be less than 100... I'll try to use Fenton's way, but i think its a litle bit more complicated. Waiting for your comments Thank you PS. sorry for my english, but isn't my native language
kennedy Posted June 27, 2003 Posted June 27, 2003 That is certainly a reasonable solution. The issue between yours and Fenton's and others will depend upon a) how many terms are related to each equipment description and : how long each glossary definition is. If there aren't too many glossary terms (less than a dozen) and if the glossary definitions are one-liners, then your solution will work great. If the glossary definitions are much longer (say, 5 lines), then your solution would result in a whole lot of definition content... and I would tend away from displaying it all at once, and instead just list the terms and show just one definition... the one selected. And even then, that's a UI taste sorta thing... a Right Brain topic.
Fenton Posted June 27, 2003 Posted June 27, 2003 The basic relational structure is about the same no matter what the actual method of data entry is. Mine has one advantage, in that it's automated; you don't need to pick anything, it looks for terms itself. But it requires some scripting. Yours is very economical. I was scripting the finding and adding the terms into a multi-line field in Equip. I was then using this in a relationship back to Glossary. All in order to be able to show the terms for that Equip record in a portal. I think of it as the "mirror" effect. You're just adding the terms manually into a portal. If you've got someone to do that, it eliminates the need for scripting. However, as kennedy points out, you're showing all the definitions for all the terms for that Equip record. You could show just the terms in the portal (not the definitions). When the student clicked on one, it could set the term (or Id) into a global field. A single related field, based on the global to term (Glossary) would show the definition. The only drawback to this technique is that the global should be cleared when you switch records; or you could make it a text field, then it would at least always be relevant to the record showing. It's mostly a matter of layout space. Another touch would be to make the terms portal's background and line the same as the the Body, make the term blue and underlined. Voila! Hypertext.
Recommended Posts
This topic is 7819 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