Solved

FM - Portal Filter Issue2

Posted on 2010-11-18
14
1,122 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 24

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
 
LVL 24

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 24

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

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 24

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 24

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 2003 SBS network periodically hangs 10 32
FileMaker Pro 8.5 CD - can I download it from somewhere? 7 1,055
Primary 1 74
Filemaker webdirect on Android - Taking pictures 2 141
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now