Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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

Posted

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!

Posted

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...
Posted

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...

This topic is 8402 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.