Solved

FM - Portal Filter Issue2

Posted on 2010-11-18
14
1,125 Views
Last Modified: 2012-05-10
Trying this one again and seeing if I can be clearer through more screen prints.

I tried to make a portal filter by two dimensions:  1) County (which is a single-entry field and works fine) and 2) Building Type (which is a checkbox or multi-entry field and does not work.  See attached for field calcs, etc.

(The check-box filter is the problem.  When I only link the relationship from County to the Countyfilter, it works fine.  When I add the buildingType checkbox field, it does not (see example in screen print where I select "Land" and it doesn't filter out the other selections).  (P.S. - I even tried to simplify by linking the PFbuildingtype field directly to the global field (g_FilterBuildingType) instead of the calc field (c_FilterBuildingType), and it still didn't work.  Any ideas?
-FilterPortalIssue.doc
-FilterPortalIssue2.JPG
0
Comment
Question by:rvfowler2
  • 8
  • 6
14 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 34167148
You are close. you just need to change your calculated value for the building type to use "1" instead of the ValueListItems function and then on the right side, create a calculated field for the BuildingType as follows:

c_PFBuidingType = List(  PFBuldingType ; 1 )

Make the relationship between the two calculated fields. See attached file. Double-Filter.fp7
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34167629
I'm a bit confused because in your sample db, you didn't relate calc to calc field for the Business Type but related BuildingType_c to BuildingType.

Also, does my original calc change as follows?  From:
If (
IsEmpty ( g_FilterBldgType  );
ValueListItems ( Get ( FileName );"BuildingType" );  
g_FilterBldgType
)

To:
Case ( not IsEmpty( g_BuildingType ) ; g_BuildingType ;
1 )

0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34168131
And, just to clarify, I'm relating the db to itself, not to another db.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 25

Expert Comment

by:Will Loving
ID: 34168262
Yes, you are correct about needing to make the relationship between both calc fields, and yes I believe your calculation is correct.

Actually, you don't need to do the calc fields at all unless you want to have it default to all Building Types being visible if none are selected. Check the attached file which just uses the original fields. If you want to have the default be that all Types are shown if none are selected - which I take it was your intent when you used the ValueListItems function - then you need to use make sure that there is a "1" in the calculation on both sides so that even if there are no values in either the Global or the CFBuildingType, the document will show up in the portal. Double-Filter2.fp7
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 34168414
This example shows it working as a self-join. It uses the original fields and no calcs. if nothing is selected, nothing show in the portal. Double-Filter3.fp7 and the second file shows it using the calc fields so that is nothing is selected all records are displayed.  Double-Filter4.fp7

Sometimes people will use something like "zzzzzzzz" instead of "1" as the constant, if there is any chance that the other referenced fields in the key might contain a 1.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34173225
Looks good in your db, but doesn't work in mine.  I even copied your formulas directly into my calc fields and then just changed the field name.  Attached is a copy of the Relationships chart and of the fields with the formulas showing.  Where did I go wrong?  (You can see in the second screenprint that no rows are showing in the middle portal.  Also, though I do use a calc for the county instead of the simple global as you do, it works by itself when I delete the building type from the "Edit Relationship" box.  All records show when no county is selected and the appropriate records do show when I do select a county.  
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34173236
Screenprints this time.
-PortalFilterIssue3.doc
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 34173590
Check the Storage options for your PFBuildingType field to make sure it is indexed.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34174179
It was set to "none", so I set it to index automatically.  I then changed a couple of records, closed the db and reopened it and it still doesn't work.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34174301
Sorry, I doublechecked your calc Building Type field and saw it was indexed where mine was unstored.  Changed that and eveything showed up and is working fine.  One last question.  What does the "1" mean in the calc.  I'm sure it is easy and obvious, but I'm trying to understand why that worked over a the ValueListItems for a multi-entry check-boxed field when it works fine for a single entry field.  Thanks so much.
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 34174658
Actually it does work now that things are properly indexed and it's a good solution. See attached file. Double-Filter4.fp7
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 34174819
I think you just missed my previous message.  It works great.  Thanks.  Just wondering how the "1" works in the calc.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 34174928
The 1 just takes the place of the ValueListItems. It's simpler code on the left but it does require you to have a calc field that includes the 1 on the right so in purest terms, the ValueListItems () is the more elegant solution. The one advantage is that if you use the 1 and the calc field on the right, documents will appear even if there is NO value in the PFBuildingType field, for instance if someone neglected to mark it.  
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 34175730
Thanks for the quick and concrete solution.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question