rikm Posted January 30, 2008 Posted January 30, 2008 What I did in fm6 was: export summary fields by customerref. to a intermediate fmfile, so I could reimport them in a statistics file as numbers. I did this in shared files and everything went well. Now, in 9, I don't seem to get the intermediate file to close in order to replace it with the most recent data. I worked around it with an excellsheet but isn't there a way to keep in inside fm? Thanks for any suggestions.
rikm Posted January 31, 2008 Author Posted January 31, 2008 As they say in Flemish: asking the question is answering it. I found the calculation GetSummary (which may or may not have existed ten years ago when I started this thing). Sorry to have bothered anyone.
Søren Dyhr Posted January 31, 2008 Posted January 31, 2008 In my huble opinion has GetSummary been there for ever at least since fm2.1! May I ask for the reasoning behind not having it as an relational approach instead? --sd
rikm Posted January 31, 2008 Author Posted January 31, 2008 Maybe cuz I don't see the relationship? Regards Rik
Søren Dyhr Posted January 31, 2008 Posted January 31, 2008 But every time you have a breaker value could it be substituted by a pair of primary- and secondary- keys in each thier respective tables. Because when you export summaries and re-import them again into a new table, is it deliberately storage of redundant data ... unless you re-import to the same table, which meanwhile has been deleted for records. The following requires only the same table, nothing external, if the task is to compile the summaries into one single record for each breaker value: Sort Records [ Specified Sort Order: Untitled::field1; ascending ] [ Restore; No dialog ] Go to Record/Request/Page [ First ] Set Variable [ $omitting; Value:GetSummary ( Untitled::theSummaryOfField1 ; Untitled::field1 )-1 ] Loop Set Field [ Untitled::field2; GetSummary(Untitled::theSummaryOfField2 ; Untitled::field1 ) ] Set Field [ Untitled::field3; GetSummary ( Untitled::theSummaryOfField3 ; Untitled::field1 ) ] Go to Record/Request/Page [ Next ] Omit Multiple Records [ $omitting ] [ No dialog ] Exit Loop If [ Get ( RecordNumber ) = Get ( FoundCount ) ] End Loop Show Omitted Only Delete All Records [ No dialog ] --sd
rikm Posted February 4, 2008 Author Posted February 4, 2008 Thanks for the suggestion, S/oren, but I don't get there with setting fields, while both the source and the target table are existing and have to remain intact. Maybe if I find a moment (during the next ten years or so) to rebuild the entire thing I'll get more use of all the givings of FMPro...
Søren Dyhr Posted February 4, 2008 Posted February 4, 2008 Alright the deletion might be too drastic a measure but you need to consider yet another option, you could the breaker value be relational key in a selfjoin where the summary fields then gets their values over the relation ... take a look... At first sight does the solution seem entirely script free, but in multiuser scenarios, are measures required to refresh the matters pulled over the relation. --sd Untitled.zip
rikm Posted February 6, 2008 Author Posted February 6, 2008 Thanks for your time, SD, I'll look into the download as soon as I find the time. Cheers, Rik
Recommended Posts
This topic is 6135 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