Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

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