PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Deletes all formulas added by <Table>.FormulaAdd.
Example
TABLE_MyTable.FormulaDeleteAll()
nRow is int
nRow = TABLE_MyTable.COL_Num.FormulaAdd("Positive mean", ProcInit, ProcAdd, ProcEnd)
// Change the background color of the row for custom calculation
COL_Num[nRow]..BrushColor = LightRed
 
nCounter is int
INTERNAL PROCEDURE ProcInit()
nCounter = 0
RESULT 0
END
 
INTERNAL PROCEDURE ProcAdd(Accumulator, ColValue)
// Ignores the negative numbers or NULL
IF (ColValue <= 0) RESULT Accumulator
nCounter++
RESULT Accumulator + ColValue
END
INTERNAL PROCEDURE ProcEnd(Accumulator)
IF nCounter = 0 THEN RESULT 0
// Calculate the mean
RESULT Accumulator/nCounter
END
Syntax
<Table control>.FormulaDeleteAll()
<Table control>: Control name
Name of control to use. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
Remarks
The preset calculations (total, mean, count, min, max) are not affected.
Component : wd240obj.dll
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment