Solved

FM - Portal Filter Issue2

Posted on 2010-11-18
14
1,127 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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