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

enumerating summary fields

Featured Replies

some reports have "control break" structure while some others don't.

Is there a way to enumerate dynamicaly in a script all summary fields used in the current layout in a hierarchical way.

- - - 8< - - - - - - - - - - - - - - -

e.g.

SALESMAN: John Smith

__MONTH: January

____SALE 1

____SALE 2

____SALE 3

__MONTH: February

____SALE 1

____SALE 2

____SALE 3

getSummaries() = "Salesman, month"

- - - 8< - - - - - - - - - - - - - - -

That way, i'll be able to kinda automate sorting on this layout without having to specify "SALE::Salesman ASC, SALE::Month ASC, SALE::DATE"

Once more, it's an ACADEMIC example.

I don't think so. I suppose you could get a list of all summary fields on a layout through a custom function (using FieldNames and FieldType). But the "hierarchy" you speak of is given by the part order - and I don't know of a function that can access that.

I any case, even if you had such list, I don't see how you could use it to automate sorting.

  • Author

Thanks comment...

Even if it's not "elegant", i do something like a big "switch case"

switch (trim(upper(get(scriptparameter))))

. . case "ID":

. . . . Sort Records(Restore; [iD] ASC)

. . case "SALESMAN":

. . . . Sort Records(Restore; [salesman] ASC)

...

...

Till there is no elegant way to sort by a column according to either it's name or it's rank from a calculated field.

I think database scheme functions would be a nice addition to FileMaker.

I guess I don't see the purpose of this. A layout is a pretty static thing. When you change your summary report, change your script at the same time and be done.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.