Jump to content

Repeat a value from previous record on a diferent field in present record


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

Recommended Posts

Even though this is a two file solution, it is a pretty complex one for the novice. The way to set this up is to use one file for the loan (Loan.fp5) and another for the payment schedule (Pay.fp5). These would be related by an auto entered field "Loan#". The records in Pay.fp5 are created with a looping script in this file run as an external script from the Loan file. The best way to bring the ending balance forward is to use a relationship based upon a composite key calculated from PaymentNumber and Loan#. Using this method, if a correction is made to any payment, the change will ripple through all the payment records. The key might consist of a couple of fields:

PaymentNumber (number)

PreviousPayment (calc, number, indexed) = PaymentNumber - 1

LastPaymentKey (calc, text, indexed, ASCII) = Loan# & "-" & PreviousPayment

CurrentPaymentKey (calc, test, indexed, ASCII) = Loan# & "-" & PaymentNumber

The self relationship in the Pay.fp5 file would match LastPaymentKey<---> CurrentPaymentKey. This would be used to access the Ending Balance from the previous records.

I realize for the novice is this much too brief of a description of how to do this, but this is quite a complex project for a novice. The concepts you will need to master to perform this design are:

Relationships

Scripting and Looping Scripts

External Scripts

Composite keys used in relationships

If this is a project for a business use, you might want to hire some consulting help to complete this in good order. If this is a personal use file, it will definitely make study to complete it.

-bd

Link to comment
Share on other sites

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