Here is the situtaion that has me stumped. (sorry it's kinda long)
I have 2 files--one that houses the Store information and one that has the Maintenance Certifications for each store.
We are tracking the water usage at each store, so each store has it's own set of Maint. certs.
The store db houses information about the store, manager, hours, dates of install and so on.
The Maint. Certs database tracks any visit made to the store--either for monthly billing, emergency or QA visits. (we only bill on data from the Monthly visits)
Each record in the "Stores" db has a unique recordID that links the "Maintenance Certs" to the individual store. Currently I have a layout in the Stores db that is a portal of the related Maint Certs.
Right now the procecss is: I get a completed MC back in the mail, I enter the data into an excel spreadsheet, then I go to the "form" (a Word Perfect document) and overwrite all the old information with new data from the sheet in my hand. I print the new blank certs with a new date, mail them to our service techs, when I get it back, it starts over.
It's such a pain to double enter the data--especially in Word Perfect.
What I want to happen is enter the MC (Maint Cert) data into a record in the MC database, and it will gernerate the new blank MC with the all the previous records data that needs to be carried over to the new one I will mail out.
Each Maint. Cert. will have a unique id, so when it comes back in to be entered, I can just search for that cert # and enter the data and be able to track which MC's still haven't been returned to me.
Hope that make senses.
Each Cert has a field for current months usage, previuos months usage, and then a total gallons used (quals "current" minus "previous") and a previous total gallons used (last certs total gallons used)
Now to the question.
Rather than enter "current" data into the new record as
the "previous" data, I want to have FMP automatically input
the "current" number from that stores most recent MC into the new records "previous" field.
So essentially it would look like this...
RecordID 1
Store #914
Date - 11-1-06
Current Usage - 2500
Previous Month - 500
Total usage - 2000
Record ID 2
Store #251
Date - 11-2-06
Current Usage - 15000
Previous Month - 11000
Total usage - 4000
Record ID 3
Store #914
Date - 12-1-06
Current Usage - 5000
Previous Month - 2500 (from record #1's "Current" field)
Total usage - 2500
In my mind, it's just a simple "find the last record for said store number, where the visit type is "monthly"....look at the "current" number and enter it in the new records "previous field"
Here is how I tried to solve
it........................................................
I set up 2 relationships in the Maint. Cert db. based on a
recommendation. One of them worked great.....IF I was trying to look up the previous records data. But unfortunately I am not. I need to look up a previous RELATED records' data (auto-enter the data from
store #914's last record).
So I worked on the second self-joining relationship and I thought I got it to work.
I created a new record for store 914 (obviously the first one one have any previous data so the "previous" field was blank) and all the calucations were correct when figuring out the total water usage. Then I created a new record for that same store and all the correct data automatically entered into the right fileds just like I wanted them to.........BUT if I created a new record with a different store, then just like the first record, it was a new blank
record for that store and if I entered information and created a new one for that store--data was correct.
After I entered a new record with a different store number (lets say 251) and then start creating more records for store 251, the data sill enters correctly, but if and try to create a new record for store #914, all the data resets to blanks.
After being stumped for a couple of weeks now (and trying everything I can think of) I am turning to you guru's for help
I set up a script to generate a new record for the current store # (this will be the new cert that I will mail out). On each record, the "current" field is entered by hand (me). Then the "previous" field is actually the "current" field defined in the relationship of "match last prev. = match last" (Portals/Rows relationship - 000001 {key-store key] 00000034[serial number] =
0000010000033)
Again this works just great as long as the record it's pulling the information from is just before it. If I enter a new store #, it starts blank and only pulls data from that stores records that are sequential before it. But the minute I create a record with a store that has already had data entered, it somehow can't look that far back.
I don't know what I am doing wrong...any insight would save me from being a bald woman LOL. Now I gotta throw a twist into it too. There are thre different service types...monthly, emergency & QA...I only want the information to be pulled from the last MONTHLY visit
(because that is the only meter readings we bill) So not only does it need to look to the previous stores record--it needs to find the previous stores MONTHLY record.
Ok thanks for any help! I am working on FMP 6, and I am willing to send the file if needs be.
Deb
I have 2 files--one that houses the Store information and one that has the Maintenance Certifications for each store.
We are tracking the water usage at each store, so each store has it's own set of Maint. certs.
The store db houses information about the store, manager, hours, dates of install and so on.
The Maint. Certs database tracks any visit made to the store--either for monthly billing, emergency or QA visits. (we only bill on data from the Monthly visits)
Each record in the "Stores" db has a unique recordID that links the "Maintenance Certs" to the individual store. Currently I have a layout in the Stores db that is a portal of the related Maint Certs.
Right now the procecss is: I get a completed MC back in the mail, I enter the data into an excel spreadsheet, then I go to the "form" (a Word Perfect document) and overwrite all the old information with new data from the sheet in my hand. I print the new blank certs with a new date, mail them to our service techs, when I get it back, it starts over.
It's such a pain to double enter the data--especially in Word Perfect.
What I want to happen is enter the MC (Maint Cert) data into a record in the MC database, and it will gernerate the new blank MC with the all the previous records data that needs to be carried over to the new one I will mail out.
Each Maint. Cert. will have a unique id, so when it comes back in to be entered, I can just search for that cert # and enter the data and be able to track which MC's still haven't been returned to me.
Hope that make senses.
Each Cert has a field for current months usage, previuos months usage, and then a total gallons used (quals "current" minus "previous") and a previous total gallons used (last certs total gallons used)
Now to the question.
Rather than enter "current" data into the new record as
the "previous" data, I want to have FMP automatically input
the "current" number from that stores most recent MC into the new records "previous" field.
So essentially it would look like this...
RecordID 1
Store #914
Date - 11-1-06
Current Usage - 2500
Previous Month - 500
Total usage - 2000
Record ID 2
Store #251
Date - 11-2-06
Current Usage - 15000
Previous Month - 11000
Total usage - 4000
Record ID 3
Store #914
Date - 12-1-06
Current Usage - 5000
Previous Month - 2500 (from record #1's "Current" field)
Total usage - 2500
In my mind, it's just a simple "find the last record for said store number, where the visit type is "monthly"....look at the "current" number and enter it in the new records "previous field"
Here is how I tried to solve
it........................................................
I set up 2 relationships in the Maint. Cert db. based on a
recommendation. One of them worked great.....IF I was trying to look up the previous records data. But unfortunately I am not. I need to look up a previous RELATED records' data (auto-enter the data from
store #914's last record).
So I worked on the second self-joining relationship and I thought I got it to work.
I created a new record for store 914 (obviously the first one one have any previous data so the "previous" field was blank) and all the calucations were correct when figuring out the total water usage. Then I created a new record for that same store and all the correct data automatically entered into the right fileds just like I wanted them to.........BUT if I created a new record with a different store, then just like the first record, it was a new blank
record for that store and if I entered information and created a new one for that store--data was correct.
After I entered a new record with a different store number (lets say 251) and then start creating more records for store 251, the data sill enters correctly, but if and try to create a new record for store #914, all the data resets to blanks.
After being stumped for a couple of weeks now (and trying everything I can think of) I am turning to you guru's for help
I set up a script to generate a new record for the current store # (this will be the new cert that I will mail out). On each record, the "current" field is entered by hand (me). Then the "previous" field is actually the "current" field defined in the relationship of "match last prev. = match last" (Portals/Rows relationship - 000001 {key-store key] 00000034[serial number] =
0000010000033)
Again this works just great as long as the record it's pulling the information from is just before it. If I enter a new store #, it starts blank and only pulls data from that stores records that are sequential before it. But the minute I create a record with a store that has already had data entered, it somehow can't look that far back.
I don't know what I am doing wrong...any insight would save me from being a bald woman LOL. Now I gotta throw a twist into it too. There are thre different service types...monthly, emergency & QA...I only want the information to be pulled from the last MONTHLY visit
(because that is the only meter readings we bill) So not only does it need to look to the previous stores record--it needs to find the previous stores MONTHLY record.
Ok thanks for any help! I am working on FMP 6, and I am willing to send the file if needs be.
Deb