Page 1 of 1

getting the total of fld "x" from every card of a stack

Posted: Tue Aug 07, 2012 7:08 am
by herbwords
Hi,

fld "x" is on every cd of a stack after cd "firstCard" of the stack.

I'm trying to add the amounts of fld "x" from every cd in the stack and display the total in fld "y" on cd "firstCard"

any suggestions?

Thanks,

herbs

Re: getting the total of fld "x" from every card of a stack

Posted: Tue Aug 07, 2012 8:14 am
by jmburnod
Hi Herbs,

I think this script do the job

Code: Select all

on AddValueOfFlds
   put 0 into tTotal
   repeat with i = 2 to the num of cds of this stack
      add fld "x" of cd i to tTotal
   end repeat
   put  tTotal into fld "y"
end AddValueOfFlds
Best regards

Jean-Marc