desta Posted January 7, 2010 Posted January 7, 2010 Ok, this one seems simple yet my dumb mind continually gets stuck finding a way to script this, so any help would be great. I have a simple Filemaker database, with one table "predictions" containing 17520 records. There are only three fields: "date", "time" and "predicted value" If everything is ok, every record's "date" and "time" values are supposed to be all equally seperated when sorted, so that there is always one hour difference between them. No problem so far but, to integrate these predictions with another database, I would need the same kind of table, with the same three fields, but with 70080 records (4*17520), so that there is always 15 minutes difference between them instead of one hour. The prediction values of the new records would need to be interpolated linearly from the original 17520 values. For example, if I have a database that has these values for two records: (date;time;predicted value) 01/01/2010; 00:00:00; 2.570 01/01/2010; 01:00:00; 2.035 I would need a script that will generate the "in-between" values and add these interpolated values into new records (the original values must remain unchanged, and it must not have duplicates) just like this: 01/01/2010; 00:00:00; 2.570 01/01/2010; 00:15:00; 2.436 01/01/2010; 00:30:00; 2.303 01/01/2010; 00:45:00; 2.169 01/01/2010; 01:00:00; 2.035 It seems simple, but I always end up with a very complicated script, with many loops, if/Elseif script steps, that either generates empty records, scrambles the data, or never ends... Anyone has done something similar before?
comment Posted January 7, 2010 Posted January 7, 2010 I would add repeating calculation fields to the source table to calculate the interpolated values and their times - then import into the new table, with the option to split the repeating fields into separate records.
desta Posted January 7, 2010 Author Posted January 7, 2010 [split the repeating fields into separate records] I didn't think of using repetitions... this might simplify records navigation a lot! thanks. I try it right away.
comment Posted January 7, 2010 Posted January 7, 2010 Uhm... I haven't suggested USING the repetitions - except as a temporary measure for the conversion process.
Recommended Posts
This topic is 5435 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