ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Deletes all formulas added with <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].BackgroundColor = LightRed

nCounter is int
INTERNAL PROCEDURE ProcInit() 
	nCounter = 0
	RETURN 0
END

INTERNAL PROCEDURE ProcAdd(Accumulator, ColValue) 
	// Ignores the negative numbers or NULL
	IF (ColValue <= 0) RETURN Accumulator
	nCounter++
	RETURN Accumulator + ColValue
END
INTERNAL PROCEDURE ProcEnd(Accumulator) 
	IF nCounter = 0 THEN RETURN 0
	// Calculate the mean
	RETURN Accumulator/nCounter
END
Syntax
<Table control>.FormulaDeleteAll()
<Table control>: Control name
Name of the control to be used. 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: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/25/2024

Send a report | Local help