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

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

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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

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