AnsweredAssumed Answered

using a GetSummary field in a script

Question asked by vmtc on Aug 24, 2010
Latest reply on Aug 24, 2010 by MikhailEdoshin

Title

using a GetSummary field in a script

Post

Hi, 

Is it possible to include a Get Summary field in a script? 

I am trying to work out payments to authors based on their titles. I want to find records which are due for payment and mark them as payable.

A  payment is based on a title which has its own statement. However, a recipient may have more than one title. Payments are only paid if the total owing is more than $100. Otherwise they are carried forward to the next period. 

It is possible to have a negative result on a statement but this is not subtracted from the total to be paid.

A GetSummary field, sorted by Address ID  finds when the total payment is above $100.

My thinking was that I should write a script with the following steps:

1. Find the records where the amount due was >0 (eliminating the negatives which are not included in the calculation)

2. Sort found set by the Address field. This would populate the Get Summary field (ie  summary of amount due when sorted by address field).

3. Constrain the found set  for values in GetSummary field > 100.

4. Set variable "Yes" in a 'To Pay' field.

However when I tried doing the find, sort and constrain manually, the constrain said no records matched (there are ones that do). I'm sure this is to do with the fact the field needs to be sorted before calculating a value, but don't know how to get around it.

Can anyone help?

I'm using FM 10 Adv on Mac OS but it is used on Window XP, Vista and 7.

Outcomes