ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Pivot Table functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Allows you find out the position of the selected cell and to select a cell in a Pivot Table control.
Example
// Get the current position
pvtPos is pvtPosition
pvtPos = PVTSelect(PVT_Stats)
IF NOT pvtPos.Out THEN
Trace(pvtPos.Country + " " + pvtPos.City)
END
// Loop through the selected cells
pvtPos is pvtPosition of PVT_MyPVT
 
nbSel is int = PVTSelectCount(PVT_MyPVT)
FOR i = 1 TO nbSel
pvtPos = PVTSelect(PVT_MyPVT, i)
Trace(pvtPos.COL_Today_Date + ":" + pvtPos.COL_Product))
END
pvtPos is pvtPosition
// Select "France / 2014"
pvtPos.Country = "FRANCE"
pvtPos.Year = "2014"
PVTSelect(PVT_Stats, pvtPos)
Syntax

Retrieving the position of selected cell in a Pivot Table control Hide the details

<Result> = PVTSelect(<Pivot Table control> [, <Rank>])
<Result>: pvtPosition variable
pvtPosition variable containing the position of selected cell in the control. If no element is selected, the Out property of the pvtPosition variable returned is set to True.
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Rank>: Optional integer
Rank of selection for a multi-selection control. If this parameter is not specified, the position of first selected cell is returned.

Selecting a position in a Pivot Table control Hide the details

PVTSelect(<Pivot Table control> , <Position> [, <Value>])
<Pivot Table control>: Control name
Name of the Pivot Table control to be used.
<Position>: pvtPosition variable
Name of the pvtPosition variable corresponding to the position to select. A WLanguage error occurs if the position does not correspond to a visible cell.
<Value>: Character string
Name of the value to select. If this parameter is not specified and if several values are found in the same cell, the first value is selected.
Business / UI classification: UI Code
Component: wd290obj.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/04/2023

Send a report | Local help