Jump to content
Server Maintenance This Week. ×

Feeding data...


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

Recommended Posts

Hi!

 

I've got a list with among other data a number. I want to save in a field the count of those numbers, for instance on today's run we've got two counts of 104, seven of 201, 13 of 220, and so on (somewhere like ten different values every day).

 

I has to be saved every night for a history.

 

It will run as nightly scripts on a FM Server 13.

 

What is the best solution for this? Sort Data, count the occurrences and feed a repeated field is the one I have in mind. Is this old fashioned or the way to go?

 

Thank you for your comments on this.

Link to comment
Share on other sites

Okay, then. First, I would suggest that your target table have the following fields:

• Date

• Value

• Frequency

I presume the purpose of this table is to allow some statistical overviews to be produced - which would make repeating fields a very poor choice.

 

Now, as you have already surmised, your script needs to find the relevant source data, sort it by value (Title?) and then create a record in the target table for each sub-summary value. This is best achieved using a method called "Fast Summaries" (look it up).

Link to comment
Share on other sites

I'm not sure it's the best way to go as it should create a history

 

There are two questions here:

 

1. What is history (in this case)?

 

2. What's the best way to keep it?

 

 

If we accept your description in the original post:

 

the count of those numbers, for instance on today's run we've got two counts of 104, seven of 201, 13 of 220, and so on

 

as the answer to the first question, then there can be little doubt that the three fields described in my post are the answer to the second one.

 

 

--

Though of course we are speaking in generalities, since you haven't told us anything about the meaning of this data and the purpose of keeping it.

Edited by comment
Link to comment
Share on other sites

There are two questions here:

 

1. What is history (in this case)?

 

2. What's the best way to keep it?

 

 

If we accept your description in the original post:

 

 

as the answer to the first question, then there can be little doubt that the three fields described in my post are the answer to the second one.

 

 

--

Though of course we are speaking in generalities, since you haven't told us anything about the meaning of this data and the purpose of keeping it.

 

Every week (title) there are occurrences of case numbers (hit). Those records might be deleted with the time, and we need to keep record of the situation at a given (past) date.

 

That's why I plan to create a new table. Is my description clear, or should I be more concrete?

 

Thank you for your advices.

Link to comment
Share on other sites

Is my description clear, or should I be more concrete?

 

I am not sure: you didn't say anything about "every week" until now. The way I understand your description now, you have a table recording every single instance of [something] and you want to keep - in another table - the history of summary values only for each day (or week?), for example:

 

Log:

2014-08-05    201

2014-08-05    201

2014-08-05    104

2014-08-05    220

2014-08-05    201

2014-08-05    220

2014-08-05    104

2014-08-05    201

2014-08-06    220

2014-08-06    104

2014-08-06    201

2014-08-06    201

2014-08-06    201

History:

2014-08-05    201   3

2014-08-05    104   1

2014-08-05    220   2

2014-08-06    104   2

2014-08-06    201   4

2014-08-06    220   1

 

That's a fairly common requirement, and implementing it is merely a matter of summarizing the daily log values and creating a history record for each sub-summary.

Link to comment
Share on other sites

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