Jump to content

Summarizies Various Values in a Repeated Field


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

Recommended Posts

  • Newbies

I a relatively new FM user and am using the FM4.0 for Windows version. I was wondering if anyone can offer me some guidance on an issue.

I have set up a Sales database where each record consitutes an invoice of items sold. Each record has a lot of non-repeating fields, such as P.O. Number, Invoice Number, Customer Name, etc. To accommodate a variety of items on one P.O./ Invoice, I have set up the items sold as a set of repeating fields such as (Quantity, Part Description, Type, and Unit Price, SubTotal). The "Type" field is a field where I use a value list to seperate the various products into discrete "types" for easy sorting. It is this field that I would like to be able to separate quantities and sales numbers for the various types to see how many of Type X we sold and for what price, etc.

The problem is... When summarizing the fields (Quantity, Sales) I cannot seem to separate the values when there are different "types" in one record. A simple find will find all occurances of a given type (this is good). However, I would then need to eliminate the totals from other "types" that are in the found records that happen to be on the same record. I am having difficulty figuring out how to get only the quantities and total sales of only one "type".

I would like to perform the finds, etc. from a script. I know I can separate the repeating fields by exporting and importing to another file, but I would like to avoid this. So that a report can be generated by a simple button push.

I have tried a GetSummary function, but I can only sort by the first value in the repeating fields and it still adds all the values together regardless of type.

Does anyone have any suggestions ? Should I have set this up some other way initially ?

Dan

Link to comment
Share on other sites

  • Newbies

Thank you for the quick response.

That's a shame. Knowing what I want to achieve, should I have set up the layout a different way ?

My other alternative was to set up a variety of non-repeating fields, such as Quantity1, Quantity2, etc for each line and do finds on each and then add them together. This would probably work , but gets a bit bulky when you have 8 lines and 5 fields in each line (40 total fields).

Any future suggestions ?

Link to comment
Share on other sites

This topic is 7810 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.