doltharz Posted November 1, 2007 Posted November 1, 2007 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.
comment Posted November 1, 2007 Posted November 1, 2007 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.
doltharz Posted November 1, 2007 Author Posted November 1, 2007 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.
comment Posted November 1, 2007 Posted November 1, 2007 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now