Solved

Can Multiple Globals be used? or how do I?

Posted on 2008-06-12
6
237 Views
Last Modified: 2010-05-18
Here is my dilemma:

I am trying to create a layout which is a generated report for a large company. On this layout There is general data fields regarding membership dues that compare the current year to the prior year.

IE "Dues Paid 2008" "Dues paid 2007" "difference in dues" "number of new members" "number of members lost" etc...

I am usually able to find everything in find mode to plug in the numbers in an excel version of the layout, but the client we are developing for is insisting on a "one or two step" process, where they input "year" into a field and click "generate report".

Is there a way to use multiple globals, or do you have suggestions on what to use (IE calculation fields, scripts, conditional formatting, etc..) to achieve this?
0
Comment
Question by:Eroots
6 Comments
 
LVL 9

Expert Comment

by:jvaldes
ID: 21771314
In filemaker you can do anything you can do from the menu in a script. If you can't figure out how to  do it with calculations you may want a script that does the same work then stores the data in a global field and then display the results in a final layout that properly expresses your results.

I don't know enough about your database to understand what you are trying to report.

For example you can do a find that meets a certain criteria and if you wanted to store the number of records that meet that criteria you would set field (g_records;get(foundcount) etc... This will store the number of records in a global called g_records. g_records should be set to number type and global storage
0
 
LVL 28

Expert Comment

by:lesouef
ID: 21771963
a summary report is probably what you need...
0
 

Author Comment

by:Eroots
ID: 21772035
the trouble with summary fields is that they can only be used with one global, I could do summary fields if I was able to set two globals (IE 2007 and 2008).

Jvaldes- I like your script idea, is there any way to chain multiple "set globals" together in one script so that I could sum 2 different fields with two variables in the one script?

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 28

Expert Comment

by:lesouef
ID: 21773215
I was not talking of summary fields but summary reports, ie using sub-summaries parts in layouts, which can summarize any table by breaking on one or more given fields, and thus get several summary values based on a field, year in your case.
0
 
LVL 10

Accepted Solution

by:
webwyzsystems earned 400 total points
ID: 21852627
Hi,

This very simple to accomplish in Filemaker Pro. I am assuming you are on FMP 7.0 or better.
Here is a single step process, that will allow you to add a very slick comparison layout to your system. I had to make some guesses as to how your system is designed...please adapt to suit.
Remember that this is examples only to get you going.

First - define a new table: REPORT_GUI
In that table there are going to be several new fields, but we will start with some globals:
g_comparisonYear1, number, global storage
g_comparisonYear2, number, global storage

In your data tables (the tables you are doing your searches on) you will need to define a calculation field to narrow down the date. For example:

In PAYMENTS, your calculation might be: transactionYear=Year(transactionDate)
in MEMBERS, your new memberships calculation might be: signupYear = Year(dateJoinedAsMember)
in MEMBERS, your lost members calculation might be: cancelYear=Year(dateOfLastRenewal)

Now, go to DEFINE DATABASE, RELATIONSHIPS

Start creating your relationships: They will be something like
CurrentFees -> REPORT_GUI::g_comparisonYear1 = PAYMENTS::transactionYear
PastFees-> REPORT_GUI::g_comparisonYear2 = PAYMENTS::transactionYear
CurrentMembers-> REPORT_GUI::g_comparisonYear1 = MEMBERS::signupYear
PastMembers-> REPORT_GUI::g_comparisonYear2=MEMBERS::cancelYear
etc...
keep on creating relationships until you have got all your fields setup for the big report.

Go into the new table REPORT_GUI. Build the matching calculation fields:

AnnualFeesYear1_calc = SUM(CurrentFees::transactionAmount)
AnnualFeesYear2_calc = SUM(PastFees::transactionAmount)
AnnualDifference_calc = AnnualFeesYear1_calc  - AnnualFeesYear2_calc
AnnualMembersYear1_calc=COUNT(CurrentMembers::IDKEY)
AnnualMembersYear2_calc=COUNT(PastMembers::IDKEY)
MembersDifference_calc=AnnualMembersYear1_calc - AnnualMembersYear2_calc

Now, go back to the REPORT_GUI layout that was automatically created when you built the new table.
Just use the FORM view, and make it big. You are going to create 3 columns here, but manually. First column is YEAR 1, second column is YEAR 2, and third column would be your comparison results.

At the top of column 1, drop the field g_comparisonYear1. The user will enter the first year to compare.
Under that, place your new calculation fields.
eg:
g_comparisonYear1
AnnualFeesYear1_calc
AnnualMembersYear1_calc

Then, create column 2 - by putting the field g_comparisonYear2 at the top. The user will enter the second year to compare against. Under that, place your new calculation fields.
eg:
g_comparisonYear2
AnnualFeesYear2_calc
AnnualMembersYear1_calc

Finally, column 3 will contain your difference calculations.
eg:
COMPARISON RESULTS (just a title here)
AnnualDifference_calc
MembersDifference_calc

And that's it!

All the user does is type in the years they wish to compare at the top of the columns - and boom it's all done for them. No mess, no fuss, no scripts....just easy!

One caveat: This tends to get rather slow once you get over 1 million records in the data tables. I know this from direct, hard experience. So if you are dealing with millions of transaction records, you will need to do this a different way.

Hope this helps,

Rob A.
0
 

Author Closing Comment

by:Eroots
ID: 31466545
I was trying to avoid the creation of new fields and a table relative to one report, but depending on how things go, this thing might be the best option for it.
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

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

862 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

29 Experts available now in Live!

Get 1:1 Help Now