joegold Posted February 4, 2005 Posted February 4, 2005 In FM6, I used to use the disappearing portal trick described on page 414 of "Special Edition: Using Filemaker Pro 5". Basically you use a portal to make buttons and fields diappear or reappear based on a relationship. I can't seem to make this same bahvior work on FM7. I'm trying to make a "show all contacts" button disappear when the user is viewing the complete set of records, but when the user is viewing a smaller found set, the "show all contacts" button would reappear. Any idea what I may be doing wrong? Or is there a change in behavior in FM7?
stefanshotton Posted February 4, 2005 Posted February 4, 2005 it all hinges around a constant .ie a calc of no 1 if xyz field is empty then set field as 0 if xyz field is not empty set field as 1 then create a relationship so it only displays those fields with value 1 this becomes your portal related table choice
joegold Posted February 6, 2005 Author Posted February 6, 2005 Yes, I understand that. Here's how I had it set up in FM6 In my data file: findportal=if(found_records=total_records,0,1) found_records=status(currentfoundcount) total_records=status(currentrecordcount) in a separate file named constants, I have only one record. I have a number field named "one" which has the value of 1. Then I have a relationship where "find_portal" from the data file = "one" from the constants file Then I have a portal with a "show all contacts" button on it. When the found set is less than the total number of records, the "show all contacts" button is visible. When the found set equals the total number of records, the "show all contacts" button disappears. Here's how I had it set up in FM7 In my data table: findportal=if(found_records=total_records,0,1) found_records=get(foundcount) total_records=get(totalrecordcount) in a separate table named constants, I have only one record. I have a number field named "one" which has the value of 1. Then I have a relationship where "find_portal" from the data table = "one" from the constants table Then I have a portal with a "show all contacts" button on it. But the portal is not disappearing when the total records equal the found records. What's really odd is that when I move to a different record the button does disappear, but when I move back to the original record, the "show all contacts" button incorrectly returns. Since the number of records in the found set has nothing to do with what record I am on, I would expect the appearance or disappearance of the portal to be the same throughout all the records. But that is not the case. Anyone have any ideas?
RalphL Posted February 6, 2005 Posted February 6, 2005 Try puting the constant in the the data table. I have had this working in 7 just like it did in pre 7. You could use get(foundcount) = get(totalrecordcount) since you are usin 1 as you constant.
Recommended Posts
This topic is 7230 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