Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Updating Calculated Fields (Functions/Subroutines/Programs) ====== ====== ====== ==== Created at 08 APR 1997 01:43PM ==== In order to have a calculated field update information on the fly when entering in data into and edit table, you have to add code to the calculated field in the table builder. The following code example shows how to do this. The code is also based on two(2) numeric fields, both multi-valued, (QTY & PRICE) updating the calculated field (COUNT), also multi-valued. @ANS = "" QTY = {QTY} <1,@mv> PRICE = {PRICE} <1,@mv> COUNT = COUNT(QTY, @vm) + (QTY # "") for i = 1 to COUNT IF len(QTY<1,i>) and len(PRICE<1,i>) and num(QTY<1,i>) and num(PRICE<1,i>) THEN @ANS<1,i> = (QTY<1,i>) * (PRICE<1,i>) END next i kb/kb_articles/kb0088.txt Last modified: 2024/01/30 13:36by 127.0.0.1