Jump to content

This topic is 8219 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi there,

I have nearly completed my real-time sign in program and what I need now are the stats that it produces. I have compiled one day's worth of data fine using a URL like:

http://10.4.1.102/fmpro?-db=studentsignin.fp5&-format=itemized_stats.htm&-op=eq&date_of_creation=06/17/2002&-find

But what I need now is a way to show all the days in in a period itemized (say for a whole month) as seperate days shown on the same format file. I've tried:

http://10.4.1.102/fmpro?-db=studentsignin.fp5&-format=itemized_stats.htm&-op=gte&date_of_creation=05/01/2002&-op=lte&date_of_creation=05/31/2002&-find

And it gave me all of my statistics, but being the running totals that they are, it only showed one line of stats compiled for the time period.

I tried to put the [fmp-record] [/fmp-record] tags around the cdml tags and I only get the same compiled result like over and over again in different fields. Anyone have any suggestions?? I'm stumped. Thanks!

Posted

Can I assume that every login is recorded in 'studentsignin.fp5'? Also, that you want to list by date and summarise on a per day basis?

Are the stats the number of logins etc? And are you using 'Summary' fields for these?

Garry

Posted

It appears you are trying to find all records within a range of dates. Once found those records will need to be sorted as to date, so you will need to include the sort in your link. I offer a standard response to the find I believe you are trying to achieve.

My standard response to the exact find:

Remember that you are trying to get your format file to talk with your db file.

USE THIS RESOURCE OFTEN.

http://www.filemaker.com/support/index.html

________________________________________________________

Search and read: Article Number: 104829, and Article Number: 105687

________________________________________________________

Understanding the use of the symbols of an exact search in a cdml solution will enable you to understand how to use in your cdml solutions all the symbols available in the FMPro db find operation (see db status bar).

See also these useful threads in the cdml forum for examples and other approaches/ideas:

Posted

Hi Garry,

Yes, every login by a student that wants to be tutored is in studentsignin.fp5.

The stats are summary fields based on the subject they came in to be tutored for. I can get the stats for one day fine, but if I want multiple days stats on the same format file, I can't seem to get individual days to show up. Thanks for your input in advance!

What I'm looking to do is on one format file, print the statistics of many days with those days' stats and dates itemized by date. I was having a problem with the search string. Thanks for your input!

Posted

"The stats are summary fields based on the subject they came in to be tutored for. I can get the stats for one day fine, but if I want multiple days stats on the same format file, I can't seem to get individual days to show up."

"Summary fields are associated with groups of records. The value in a summary field can change depending on where you place the field on a layout, how many records are in the found set, and whether the records are sorted.

"Copyright

Posted

Personally, I haven't had much success using FM Summaries and CDML. I usually use Javascript for this.

I would love to hear if other people are using Summary fields and CDML. If not, there are some examples around here on how to do this with Javascript.

If you can't find them, I will be able to give a couple of examples later today.

All the best.

Garry

Posted

Thank you very much Keith for your input! Ok, my next question is...based on the idea that the summary fields are about a group of records found, can you using CDML , have multiple finds on the same page?? It looks as if that's most likely what I need as the data I need aren't records themselves, just counts of records according to the days that were queried. Like:

Date(s) Students in for English Tutoring

06/17/02 55 <---- Summary Data

06/18/02 24 <---- Summary Data

I've done queries for timecards (via CDML) that was based on a person's name and it pulled up all the instances they clocked in and out as individuals, but I'm looking to do the exact same thing...only they aren't individuals (or records for that matter) but dates that only have summary data all on one page for multiple dates.

Posted

Hi again Keith,

Thanks on the tip about inline actions! It worked with only one hitch. It can't calculate totals amongst the data that is on the report. That is a HUGE problem.

So I got (sorry for simplifying the tags...just for illustrative purposes):

[inline action]

results date 1

[/inline action]

[inline action]

results date 2

[/inline action]

And no way to add the results of day 1 to day 2. Man, that's harsh. Any other ideas?? Thanks!

Posted

Ideas I have aplenty.

I don't know if this will help you or not. I have found that on a layout dedicated to the web solution, a field (which would be formatted as a sub-summary field or a summary found on a layout such as used in a peer-to-peer solution) can be formatted as "Standard". Access to the data can then be achieved using the simple [fmp-field: fieldname] tag.

Posted

Here is one way, with Javascript:

[FMP-InlineAction:....]

<script>nSummary1 = 0 ;[FMP-Record]

nSummary1 += [FMP-Field: amount] ;[/FMP-Record]

document.write("Total for [FMP-Field: date1] = " + nSummary1 + "<br>");

</script>

[/FMP-InlineAction]

[FMP-InlineAction: ....]

<script>nSummary2 = 0 ;[FMP-Record]

nSummary2 += [FMP-Field: amount] ;[/FMP-Record]

document.write("Total for [FMP-Field: date2] = " + nSummary2 + "<br>");

</script>

[/FMP-InlineAction]

<script>

document.write("The Grand Total = " + (nSummary1 + nSummary2));

</script>


Hope this helps.

Garry

  • 1 month later...
Posted

I realize this is coming really really late after the original posting, but I just wanted to say thank you garrycl. You spurred my interests in CDML mixed w/ JavaScript and I thank you for providing me w/ snippets of stuff to learn from.

I also wanted to post what finally worked for me if anyone is interested like I was when I was a CDML/JS newbie....

I have a series of FMP fields that post numbers, and a series of JavaScript calculations. What's really kewl I noticed in Internet Explorer 5 is that you can put different snippets of code in the HTML w/o having to necessarily puttting (or declaring variables for that matter) between the <head> tags...

so I have two FMP fields named fmp_field1 and fmp_field2 that I want to add to a total:

**Note** I ran into the problem early on that if a FMP field was blank, that it wouldn't even bother to calculate the rest of the formula, so I had to add it to zero to solve the problem. **end of note**

<table>

<tr>

<td>

<script>

var fmp_field1=[fmp-field:fmp_field1] + 0;

document.write(fmp_field1);

</script>

</td>

</tr>

<tr>

<td>

<script>

var fmp_field2=[fmp-field:fmp_field2] + 0;

document.write(fmp_field2);

</script>

</td>

</tr>

<tr>

<td>

<script>

var total=fmp_field1+fmp_field2;

document.write(total);

</script>

</td>

</tr>

</table>

Just wanted to give an example of a topic that isn't documented very well and that isn't discussed much for people like me who were newbies and wanted to know....

Posted

Garry earlier wrote, "I would love to hear if other people are using Summary fields and CDML."

With the help of Stephen I have posted at Sample Files a solution which demonstrates one use of the summary field through a browser. You will note that the demonstration summarizes a dollar amount. In order to display this correctly in the browser a calc field has been created to convert the summary amount to a text field. But the data does arise from the Summary.

Download it. Run it. Tear it apart. It's open. It's free. Please enjoy it.

This topic is 8219 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.