AnsweredAssumed Answered

script help

Question asked by AdamReed_1 on May 17, 2015
Latest reply on May 18, 2015 by philmodjunk


script help


I'm relatively new to scripting, and so have minimal skill.

I have a number of payments that are due based on a contract.  When a particular payment is received, I run the attached script to generate a record in a disbursement table -- fields in that table run some simple calculations to give a bookkeeper instructions on how to issue that particular payment, and once a payment receives a disbursement id it is considered paid.

There are cases, however, in which a payment is split between more than one client.  In those cases the payment may be split evenly or not, expenses may be applied to one client and not the other, etc., so the calculations really have to be applied to the particular client's share.  Thus, I would like to generate multiple records in the disbursement table (one for each client) that share a payment id.

I've created the attached script, which works well, however does not separate multiple authors who may share payments.

I believe what I want to do is create a loop that looks at successive portal rows in a related record in the author share table, and the creates new disbursement layouts if a portal row is not empty create a new disbursement sheet.  I don't really know the details of how to do this.

Just let me know, of course, if more information would be helpful, and thanks very much for any help.