Jump to content

enumerating summary fields


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

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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