Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sub-summary in a result page

Featured Replies

I am looking for a method to decide if a special record in a hit list needs a leading (or trailing) sub-summary line. The reason is that I want to group that records by a special field content, like:

Country A

City 1

City 2

Country B

City 1

City 2

City 3

Country 3

City 1

and so on. If it comes to a page break, the new page also needs to start with a headline, like:

Country 3

City 2

City 3

...

Is there any way to compare the field content of te current record with the record listed before? If they are different a subline would have to be created.

Please excuse my poor English.

Do you want to do it on web page? With CDML you have increased handling options for results. I do not fully understand what you want to achieve, but with additional If...Else IF....Endif from CDML all sort of tricks are possible in browser.

  • Author

quote:

with additional If...Else IF....Endif from CDML all sort of tricks are possible in browser.

Thank you for your answer. Prague always was a friend to Nuremberg :-)

Of course I understand that I have to use a structure like

[Record]

[FMP-If:*]

<BR>[FMP-Field:Country]<BR>

[/FMP-If]

[FMP-Field:City]<BR>

[/Record]

But I have no Idea what expression to use in the IF statement instead of the asterisk.

quote:

Originally posted by Rainer:

Thank you for your answer. Prague always was a friend to Nuremberg :-)

Of course I understand that I have to use a structure like

[Record]

[FMP-If:*]

<BR>[FMP-Field:Country]<BR>

[/FMP-If]

[FMP-Field:City]<BR>

[/Record]

But I have no Idea what expression to use in the IF statement instead of the asterisk.

Rainer, send me the bits, which are connected, the db with few records and your HTML page and I will do some homework over weekend... [email protected]

Anatoli

  • Author

That's very kind of you, Anatoli. In the meantime I found a solution as follows:

For deciding if a record is the first one in a sub-summary group, I have FileMaker computing a GetSummary calculation (you need 3 fields for this!). The value of this summary field can now be compared against the CurrentRecordNumber. If they are equal, that record is the first one in the group:

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]

On a second page there are two cases:

1) The first record on that page starts a new group. In this case a headline is generated.

2) The old group continues on that page. In this case I use the opposite statement outside the [FMP-Record] bracket:

[FMP-If:CurrentRecordNumber.neq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]

Works fine so far!

I had something like that in mind.

I am glad I've triggered your creativity :-)

You can do great things with HTML/CDML conditions! I am using that often.

Have fun! Anatoli

  • 4 months later...

I am trying to replicate what Ranier did in this solution so that I can create a sub-summary looking report for a results page.

I want to show the title of each class we offer GROUPED under the category for the class.

-- I made a field in my database called COUNTER that is set to equal 1.

-- I made a summary field called SUMofCOUNTER that is a total of COUNTER (since I need a summary field in order to use the GetSummary function.

-- I set up a field called GROUPEDSUMMARY that is equal to GetSummary( SumOfCounter ,MajorCategory )

-- I set up a field called RECORDNUMBER that is equal to Status(CurrentRecordNumber)

When I set up a layout in FileMaker to see how this will all calculate, I see that in the first of the five categories, sixteen titles are found, the RECORDNUMBER function shows up as numbering from 1 thru 16. And the GROUPEDSUMMARY field =16

Then the next category begins and it has two titles in it .

GROUPEDSUMMARY field =2

but the RECORDNUMBER function keeps numbering from 17 thru 18

and this continues as the categories keep coming up.

With this in mind, I can't figure out how Ranier could make the following work out:

"For deciding if a record is the first one in a sub-summary group, I have FileMaker computing a GetSummary calculation (you need 3 fields for this!). The value of this summary field can now be compared against the CurrentRecordNumber. If they are equal, that record is the first one in the group:

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]"

-------

Help?

  • 9 months later...
  • Newbies

You just need to check the "Running Total" checkbox for the summary field.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.