Solved

Parent/Child/Grandchild Portal and filtering the grandchildren help needed

Posted on 2012-12-24
10
805 Views
Last Modified: 2013-01-08
Database setup (relevant fields)

Client  (parent)
- client ID
- g_Selected Date (global field to pass date to another layout)

Department (child; many depts linked to one client)
- dept ID
- client ID (linked to client table)

KPI  (grandchild; many KPIs to one department, one for each date)
- dept ID
- KPI date
- KPI 1
- KPI 2

I setup a layout (based on client table) with a portal (based on department table).  The fields in the portal are the four listed in the KPI table.

The Problem:  How do I limit the portal to only show KPIs with a date based on a variable passed to the layout (actually, the global field in the Client table)?  I've tried to use the Filter option in the portal using the following calculation:

KPI::KPI Date = Client::g_Selected_Date

The filter will not display anything.  If I turn the filter off, I see all the KPIs (all days) for all the departments under that client ID.

Not sure how to limit the portal.

Reminder - the portal is based on the Department table, not the KPI table.  I think that is the problem.  The filter I want to do is to limit entries from the KPI table, but the portal is based on the Department table.

Example Entries in KPI table:

Record 1
DeptID:  1
KPI Date:  12/20
KPI1:  5

Record 2
DeptID:  2
KPI Date:  12/20
KPI1:  9

Record 3
DeptID:  1
KPI Date:  12/22
KPI1:  7

Record 4
DeptID:  2
KPI Date:  12/22
KPI1:  5

So, lets say that I have the date set to 12/22.  I only want to see records 3 and 4.  Without the filter, only the first two records appear no matter how many are in the KPI table.
0
Comment
Question by:OTAdmin
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 2

Expert Comment

by:corvetteguru
Comment Utility
I will admit first that I am NOT a FileMaker Pro person. My comments are simply data base design related and might spur a solution within the limits of your environment.

With that said... Since I live in a SQL world, this would be handled with a serious of cascading joins. Each referencing from the last.

I am concerned that the KPI's are not truly associated to the Client.

If I am reading your structure correctly, you have a date from the client, which connects to a department which  has a KPI, but that KPI could be associated to several clients... is that okay? Or am I missing something?

Again, not knowing the world of FileMaker, can you assign a date as a local variable to use as a parameter down the line? Since the date is not directly associated, can you say something like:

DECLARE @KPIDate
@KPIDate =  Client::g_Selected_Date

And then down the line, use that @KPIDate as a filter?

KPI::KPI_Date = @KPIDate

Would something like that work?
0
 

Author Comment

by:OTAdmin
Comment Utility
The KPIs are associated with a department if (one dept to many KPIs that are date driven).  The depts (many) are then associated with a client (one).  The global date field is a FM Pro trick to work with layouts.
0
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
If g_Selected Date is a global field, it may not matter in which table it lives.  Can you push it down to the department table and then build the relationship from there?

Here is a little sample that works for the problem you described, but I don't know if it will work for your overall solution.
KPI-Selector.fp7
0
 

Author Comment

by:OTAdmin
Comment Utility
Thanks.

I just checked this and although it works, we are running into the problem of displaying the department name in the filtered list.  Take a look at the file (it is a FMP 12 file, can you read that?  If you can't, you can recreate what I did...see below.)

I added Dept name to the Dept table.  Then I added the Dept Table:Dept Name to the filtered list.  You will notice that Dept Name repeats and is not displaying the linked department name properly.

Unfortunately, displaying the department name in the filtered list is needed...and the names can change slightly, so placing it in the KPI table isn't really an option.

Thoughts?
0
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
Yes, I can do FMP 12 as well.  Did you forget to attach the file?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:OTAdmin
Comment Utility
0
 
LVL 2

Expert Comment

by:ozbigben
Comment Utility
I think that was the file from a different question ;-)

There are a couple of ways of linking clients to multiple departments, the practicality of which will partly depend on how many departments you have. The attached sample uses a repeating field which is easy for a small number of departments.  

To get the department name to display correctly, the deptID has to be linked to the KPI: deptID
KPI-portal.fmp12
0
 

Accepted Solution

by:
OTAdmin earned 0 total points
Comment Utility
The solution ended up being adding a copy of the dept table "downstream" of the KPI table.  THis allowed us to properly display the department names and still base the portal on the KPI table.
0
 
LVL 2

Expert Comment

by:ozbigben
Comment Utility
As in the sample provided above ;-)
0
 

Author Closing Comment

by:OTAdmin
Comment Utility
Determined it based on other research I did.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PDF In Filemaker GO 3 1,018
FileMaker Pro Table Relationships Issue 7 269
Filemaker xsl file 8 121
Filemaker Pro 10 display order 2 28
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

13 Experts available now in Live!

Get 1:1 Help Now