My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article
Advanced Search 

ADVISOR ANSWERS

Relate to Newest Prior Record in FileMaker Pro

Here's how to have a new report relate to the previous report, regardless of when it was created.

By Chris Moyer, technical editor; and Bob Bowers, techncial editor


Q: I have a database that contains monthly reports from various users. Each report needs to refer back to the previous report from that user for part of the content. The problem is that sometimes people skip reports (which is okay), so it isn't as simple as having a report relate to the previous month, or even the month before that. What's the simplest way to have one report relate to the previous report, which may be dated one or even six months prior to the current report?

A: The simplest way to do this, assuming you have a User ID field and a Report Date field, is to construct a relationship from the Reports table to itself that matches on these fields as follows:

Report (Report table) Report Previous (Report table)
User ID = User ID
Report Date > Report Date

This will let the current report relate to all previous reports. What you want, though, is to relate to the most recent previous report. If you change the Sort records option for the Report Previous side of the relationship so that it sorts by Report Date in descending order, then the "firs"" related record -- the one that would appear at the top of a portal -- would be the most recent one. So, even though the relationship relates to multiple previous reports, this calculation (or a related field on a layout) would give you what you want:

Previous Report Targets (calculation, text result) = Report Previous::Targets  

Relate to Newest Prior Record in FileMaker Pro

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Chris MoyerChris Moyer is president and CEO of The Moyer Group, a FileMaker Pro consulting and training firm with offices in Atlanta, Chicago, and San Francisco. Chris is a technical editor of FileMaker Advisor Magazine.

    Printer-friendly
    page layout

    Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro

    ADVISORAMA
    To all personnel: Firings will continue until morale improves.

    ARTICLE INFO

    FileMaker.Advisor.com

    Web Edition: 2008 Week 38, Doc #19548

    Print Edition: October/November 2008, Page 6

    FREE ACCESS FREE ACCESS

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    moyec77-03 posted 09/15/2008 modified 06/29/2009 03:11:44 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 07/03/2009 05:21:53 PM