Hallmarker Posted June 25, 2009 Posted June 25, 2009 Hello. My name is Nick and I'm relatively new to Filemaker. This is my first time posting on these forums. I looked around and didn't see this question asked, so if it's been answer already, please point me in the right direction. Thanks My question is this: I want to be able to see and interact with a global field through a portal. I've actually gotten this to work before, but when i changed the fields to globals, it stopped working. I'll try to explain as best I can. I have a table and a table occurence with identical fields. I've set it up so that the portal on my layout is validated if a certain field is set to "yes" from a popup menu. So when the value in this field is set to yes, I am able to see my second field inside the portal, which is on the table occurence. Likewise, if I set the first field to "No", the portal will hide the second field. That makes 3 fields: Field 1, with a "yes/no" popup; Field 2, in the table occurence and also with a "yes/no" popup; and Field 3, a calculation that tells the portal when to display Field 2. It says Case(Field 1 = "yes"; Field 2). So I have gotten this to work with regular fields. However, as soon as I turned Field 2 into a global field, it stopped working. No matter what value was in Field 1, Field 2 would not show up. I want to know if it's possible to do this portal trick with global fields or if I'm doing something wrong. Or, if anybody has an alternate solution that makes Field 2 hidden unless Field 1 displays "Yes", I would appreciate any help. Thanks!
mr_vodka Posted June 25, 2009 Posted June 25, 2009 A global field or unstored calc can not be used as a match key on the child side of a relationship.
Hallmarker Posted June 26, 2009 Author Posted June 26, 2009 Oh boo. Is there a good way to do the same thing without using portals?
comment Posted June 26, 2009 Posted June 26, 2009 What exactly are you trying to do? I can't make heads or tails out of your description. Can you explain the issue in less abstract terms, perhaps with an example?
Hallmarker Posted June 26, 2009 Author Posted June 26, 2009 In simplest terms, I want to conditionally hide a field based on another field's value. In this case, I want to see Field 2 if Field 1 shows "Yes" from a Yes/No popup menu, but I want Field 2 to be completely hidden if Field 1 displays "No" or is blank. Clearly I can't do that with portal since I'm using global fields. I'm now asking if there is a good way to conditionally hide Field 2
comment Posted June 26, 2009 Posted June 26, 2009 You can do this with a portal. Define a calculation field cShowID = Case ( Field 1 = "Yes" ; SerialID ) and a self join relationship: YourTable::cShowID = YourTable 2::SerialID Place a one-row portal to YourTable 2 on the layout of YourTable and put whatever you want to hide in this portal.
Hallmarker Posted June 26, 2009 Author Posted June 26, 2009 That sounds like what I tried before and it worked. It didn't seem to work when I changed my fields to globals
comment Posted June 26, 2009 Posted June 26, 2009 The Yes/No field can be global. Any other field can be global, too - except SerialID, of course.
Hallmarker Posted June 26, 2009 Author Posted June 26, 2009 Can you explain in a little more detail? I'm still very new to this program, having only used it for a few weeks. I'd like to know how many fields I need, what type they will be, how many tables/table occurences I will need and how they fit together. You have been very helpful, so thank you very much ???
comment Posted June 26, 2009 Posted June 26, 2009 I thought that's what I did earlier. See if the attached makes it clearer. NOTE: If the Show field is global (as in my file), it affects all records. If it's not, then each record will remember its show/hide state. Visibility.fp7.zip
Recommended Posts
This topic is 5632 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