Solved

FM - Portal Filter Issue2

Posted on 2010-11-18
14
1,121 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
Comment Utility
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
Comment Utility
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
Comment Utility
And, just to clarify, I'm relating the db to itself, not to another db.
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Screenprints this time.
-PortalFilterIssue3.doc
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 24

Expert Comment

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

Author Comment

by:rvfowler2
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the quick and concrete solution.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

9 Experts available now in Live!

Get 1:1 Help Now