Skip to main content
Skip table of contents

Pivot: Create Pivot Table from Grid Data

Tag: Pivot

The Pivot tag lets you automate theFlexyView's integrated Pivot Table tool.



XML
<Pivot FilePath="databaseEZ-pivot-setup.xml"/>

Tag Attributes

AttributesAttribute ValuesValue Description
TargetApplicable Grid Code

N/A - Not Required (See detailed description)

FilePathUser definableThe file path to the previously saved Pivot configuration XML file - Required
ServerAbbreviated server names (separated by comma)

N/A - Only applicable in consoleEZ (See detailed description)

IndexPositive integerWindow index number - Only applicable in consoleEZ (See detailed description)

Detailed Description

When using the attribute FilePath to retrieve incoming files, it will validate if both the folder path is correct and that the file itself exists.

XML
<Pivot FilePath="databaseEZ-Pivot-setup.xml"/>


General grid automation actions can be used to configure the resulting pivot table, but these actions MUST be embedded within the Pivot action block.


The Server attribute is only applicable to consoleEZ, in which case it will be mandatory for Target="LogAnalyzer" or Target="VolumeAnalyzer".

The Index attribute is also only used in consoleEZ and is mandatory when using Target="LogAnalyzer" or Target="VolumeAnalyzer", it is the value found on the Log Analyzer and Volume Analyzer windows.

General grid automation actions can be used to configure the resulting pivot table, but these actions MUST be embedded within the Pivot action block.

Example Script

XML
<ytriaAutomation>
	<Load Server="ACME01/ACME" Select="True"/>
	<Pivot FilePath="C:\pivot_config.xml">
		<Export>
			<SetParam field="FilePath" value="D:\temp-exports\PivotExport.html"/>
			<SetParam field="ExportType" value="HTML"/>
			<SetParam field="FileOutput" value="Unicode"/>
			<SetParam field="OpenFileOnceGenerated" value="true"/>
		</Export>
	</Pivot>
</ytriaAutomation>


In the script above, the entire server "ACME01/ACME" will be loaded into the database tree and all databases will be selected and loaded into the main grid. The action 
Pivot will trigger the retrieval of the saved Pivot Table configuration file "pivot_config.xml" and generate a pivot table of the data in the main grid based on this based on this configuration. The resulting table will be exported to an HTML file; the file will open once it has been generated.


Tag: SetGridPivotDefault

Use the SetGridPivotDefault tag inside the Pivot tag to load the configuration directly from the script.

The content of a file generated by the Pivot dialog can be reused directly.


XML
<ytriaAutomation Application="sapio365">

	<Pivot>
		copied from an XML file created with Pivot setup dialog Save As...
		<SetGridPivotDefault>
			<AddColumn Calculation="0" Color="0" ColumnID="userType" Display="0" Legend="User Type" Title="User Type" Type="ValueX" Unicity="">
			  <SetColumnFormat Type="TFMTRegular"/>
			  <SetColumnFormat Type="NFMTRegular"/>
			  <SetColumnFormat CBX_FMT_CBXSortFlag="0" Type="CheckBoxFmtRegular"/>
			  <SetColumnFormat TextAlignment="0" TextCase="0" TextColor="4294967295" TextNotesName="False" Type="TextFmtRegular"/>
			</AddColumn>
			<AddColumn Calculation="0" Color="0" ColumnID="department" Display="0" Legend="Department" Title="Department" Type="ValueY" Unicity="">
			  <SetColumnFormat Type="TFMTRegular"/>
			  <SetColumnFormat Type="NFMTRegular"/>
			  <SetColumnFormat CBX_FMT_CBXSortFlag="0" Type="CheckBoxFmtRegular"/>
			  <SetColumnFormat TextAlignment="0" TextCase="0" TextColor="4294967295" TextNotesName="False" Type="TextFmtRegular"/>
			</AddColumn>
			<AddColumn Calculation="4" Color="0" ColumnID="officeLocation" Display="0" Legend="Office location" Title="Office location" Type="ValueV" Unicity="">
			  <SetColumnFormat Type="TFMTRegular"/>
			  <SetColumnFormat Type="NFMTRegular"/>
			  <SetColumnFormat CBX_FMT_CBXSortFlag="0" Type="CheckBoxFmtRegular"/>
			  <SetColumnFormat TextAlignment="0" TextCase="0" TextColor="4294967295" TextNotesName="False" Type="TextFmtRegular"/>
			</AddColumn>
			<AddColumn Calculation="4" Color="0" ColumnID="passwordPolicies" Display="0" Legend="Password policies" Title="Password policies" Type="ValueV" Unicity="">
			  <SetColumnFormat Type="TFMTRegular"/>
			  <SetColumnFormat Type="NFMTRegular"/>
			  <SetColumnFormat CBX_FMT_CBXSortFlag="0" Type="CheckBoxFmtRegular"/>
			  <SetColumnFormat TextAlignment="0" TextCase="0" TextColor="4294967295" TextNotesName="False" Type="TextFmtRegular"/>
			</AddColumn>
			<SetColor ColumnLabels="6999294" GrandTotal="4371454" SubTotals="8385766" Totals="5496499"/>
			<Option ExcludedFiltered="True" ShowHidden="False" WithTotals="True"/>
		</SetGridPivotDefault>
		
		<Export>
			<SetParam field="FilePath" value="D:\temp-exports\PivotExport.html"/>
			<SetParam field="ExportType" value="HTML"/>
			<SetParam field="FileOutput" value="Unicode"/>
			<SetParam field="OpenFileOnceGenerated" value="true"/>
		</Export>	
	</Pivot>

</ytriaAutomation>



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.