GM - FieldSet Pivot
(gmpkg:FieldSetPivotGridComponent)
Documentation
GM - FieldSet Pivot component is used to display a collection of records as a Pivot Table. With this component, we can display time series records with the ability to summarize and edit the data.
Use case: Display a Forecast Grid where the forecast can be set by Opportunity and by Month. See Pivot Grid Tutorial
Specification
recordId
String
recordId to use. Keep this empty if you want to use the current record.
Related Object Name *
String
The name of the related object to display
FieldSet Name *
String
The Field Set name of the related object to display
X Columns *
String
JSON Array of field API Names to build X columns of the Pivot Grid.
Donβt forget __c for custom fields.
X Column Sort
String
The field to sort with to create the pivot header.
If this field is empty, X Column field will be used.
X Column Order
String
The order for X Column Sort (asc|desc).
Keep it empty for ascending or if X Column Sort is empty
Y Columns *
String
JSON Array of field API Names to build Y columns of the Pivot Grid.
Donβt forget __c for custom fields
Y Hidden Columns
String
Y Hidden Columns API Name. The records will be grouped by Y Columns, however the hidden columns will not be displayed to the end user.
Donβt forget __c for custom fields
Value Columns *
String
The list of columns to display/edit on the grid as cells.
Donβt forget __c for custom fields
Row Limit *
Integer
The maximum number of rows to fetch.
Page Size *
Integer
The number of rows to fetch per step.
Custom Label
String
Override the title of the data grid.
Custom Icon
String
Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/
Grid Height
Integer
Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.
Filter
String
JSON string to define filter criteria. Donβt forget __c for custom fields. See GM - RelatedList Grid
Sort
String
The field list to sort the data grid. This field is used only for the initial load. Donβt forget __c for custom fields. See GM - RelatedList Grid
Order
String
Ascending or descending order for sorting. For ascending enter the value asc. For descending enter the value desc
Aggregate
String
JSON string to define the aggregate field. Use __c for custom fields. See GM - RelatedList Grid
Enable Update Object
Boolean
Check this option if you wish to allow the end-user to perform inline editing of the grid.
Enable Delete Object
Boolean
Check this option if you wish to allow the end-user to delete records. This option will show or hide the 'delete items' icon from the list of quick actions.
Enable Create Object
Boolean
Check this option if you wish to allow the end-user to create new records. This option will show or hide the 'create records' icon from the list of quick actions. β οΈWhen this option is checked, you may need to define the property Default Values to set the required fields for the object.
Enable Clone Object
Boolean
Check this option if you wish to allow the end-user to clone records. This option will show or hide the 'clone records' icon from the list of quick actions.
Enable Filter Object
Boolean
Check this option if you wish to allow the end-user to use filters.
This option will show or hide the filter combobox.
Enable Freeze Columns
Boolean
Check this option if you wish to allow the end-user to freeze columns. This option will show or hide the 'Freeze Columns' icon from the list of quick actions.
Enable Export Object
Boolean
Check this option if you wish to allow the end-user to export records. This option will show or hide the 'Export' icon from the list of quick actions.
Enable Import Object
Boolean
Check this option if you wish to allow the end-user to import CSV files. This option will show or hide the 'Import' icon from the list of quick actions.
Enable Toggle Fullscreen
Boolean
Check this option if you want to enable toggle fullscreen for the Grid. When this option is active, the end user can open the Grid in fullscreen dialog.
Enable Auto Fill
Boolean
Check this option if you want to enable auto fill. With this option enabled, the user can drag to fill values like Excel.
Hide Field Column
Boolean
The Pivot Grid is able to display multiple fields. To distinguish the fields we have an extra column containing the field name. Check this field to hide the field name.
Full Record Creation
Boolean
Check this option if you wish to create a full record instead of using a quick action.
If this option is activated, the user will be able to create a record using the assigned layout when he clicks on the βCreate New Recordβ button.
Default Values
String
JSON string to initialize a new object created from the pivot grid. See GM - RelatedList Grid
Hidden Fields
String
',' separated list of hidden fields for modal creation. When a user creates a new record, hidden fields will be defaulted but not displayed to the end-user (RecordTypeId for instance).
The configuration wizard can be used to set this property.
Grid Style
String
JSON string to override the column's style. Donβt forget __c for custom fields. This property can be used to default the width, the text alignment or wrapping for a specific column:
To set the style of the header:
{
"gm__header": "height:4rem;whiteSpace:normal"
}
To set X Column style:
{
"gm__xcolumn": "width:150px;cellcontent:wrap"
}
To set Field Column style:
{
"gm__field": "width:150px;cellcontent:wrap"
}
To set Total Column style :
{
"gm__total": "width:150px;"
}
To set any Y Column style:
{
"$YColumnName": "width:200px;cellcontent:wrap"
}
To set the alignment for any V Column:
{
"$VColumnName": "text-align:left"
}
Frozen Columns
Integer
# of columns to freeze at startup. Note that the Y Columns and Field Column will be always frozen.
Total Color
String
Total row text color
Total Background
String
Total row background color
Show Border
Boolean
Check this option if you wish to add a border to the grid.
Show Column Border
Boolean
Check this option if you wish to add a border to the grid columns.
Cell Coloring
String
JSON conditions for cells coloring. You can define for each field displayed in the grid the coloring and the corresponding condition. See GM - RelatedList Grid
ReadOnly Fields
String
',' separated list of read-only fields. The user will not be able to edit these fields the same as read-only fields on the page layout. See GM - RelatedList Grid.
Default Mode
String
String to define the initial display mode of the grid (edit | read).
If this property is set to edit, the grid is displayed in edit in the first load of the page.
API Reference
<design:component label="GM - FieldSet Pivot">
<design:attribute name="recordId" label="recordId"
description="recordId to use. Keep this empty if you want to use the current record"/>
<design:attribute name="relatedObjectName" label="Related Object Name"
description="The name of the related object to display. Ex. Opportunity"/>
<design:attribute name="fieldSetName" label="FieldSet Name"
description="The fieldSet name of the related object to display"/>
<design:attribute name="xJsonColumns" label="X Columns"
description="X Columns API Name. Donβt forget __c for custom fields"/>
<design:attribute name="xsort" label="X Column Sort"
description="The field to sort with to create the pivot header. X Column field will be user if empty"/>
<design:attribute name="xorder" label="X Column Order"
description="The order for X Colmun Sort (asc|desc). Keep it empty for asc or if X Column Sort is empty"/>
<design:attribute name="yJsonColumns" label="Y Columns"
description="Y Columns API Name. Donβt forget __c for custom fields"/>
<design:attribute name="yHiddenColumns" label="Y Hidden Columns"
description="Y Hidden Columns API Name. Donβt forget __c for custom fields"/>
<design:attribute name="vJsonColumns" label="Value Columns"
description="list of columns to display/edit on the grid. Donβt forget __c for custom fields"/>
<design:attribute name="rowLimit" label="Row Limit"
description="The maximum number of row to fetch"/>
<design:attribute name="pageSize" label="PageSize"
description="The number of row to fetch per step"/>
<design:attribute name="customLabel" label="Custom Label"
description="Override the label of data grid"/>
<design:attribute name="customIcon" label="Custom Icon"
description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/>
<design:attribute name="height" label="Grid Height"
description="Set the grid height"/>
<design:attribute name="filter" label="Filter"
description="Json string to define filter criteria. Donβt forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>
<design:attribute name="sort" label="Sort"
description="The field list to sort the data grid. This field is used only for the initial load. Donβt forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
<design:attribute name="order" label="Order"
description="Asc or Desc order for sorting"/>
<design:attribute name="aggregate" label="Aggregate"
description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Donβt forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>
<design:attribute name="canUpdate" label="Enable Update Object"
description="Check this option if you want to update object"/>
<design:attribute name="canDelete" label="Enable Delete Object"
description="Check this option if you want to delete object"/>
<design:attribute name="canCreate" label="Enable Create Object"
description="Check this option if you want to create object"/>
<design:attribute name="canClone" label="Enable Clone Object"
description="Check this option if you want to clone objects"/>
<design:attribute name="canFilter" label="Enable Filter Object"
description="Check this option if you want to use filters"/>
<design:attribute name="canFreeze" label="Enable Freeze Columns"
description="Check this option if you want to freeze columns"/>
<design:attribute name="canExport" label="Enable Export Object"
description="Check this option if you want to export objects"/>
<design:attribute name="canImport" label="Enable Import Object"
description="Check this option if you want to import CSV files"/>
<design:attribute name="canCollapse" label="Enable Grid Collapse"
description="Check this option if you want to enable Grid collapse"/>
<design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen"
description="Check this option if you want to enable toggle fullscreen"/>
<design:attribute name="canDragToFill" label="Enable Auto Fill"
description="Check this option if you want to enable auto fill"/>
<design:attribute name="noFieldColumn" label="Hide Field Column"
description="Check this option if you want to hide field column"/>
<design:attribute name="fullRecordCreation" label="Full Record Creation"
description="Check this option if you want to create a full record"/>
<design:attribute name="defaultValues" label="Default Values"
description="Json string to initialize a new object created from the data grid. Donβt forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
<design:attribute name="hiddenFields" label="Hidden Fields"
description="',' separated list of hidden fields for modal creation"/>
<design:attribute name="style" label="Grid Style"
description="Set the pivot grid style(header width, xcolumn width, total width...)"/>
<design:attribute name="frozenColumns" label="Frozen Columns"
description="# of columns to freeze"/>
<design:attribute name="TotalColor" label="Total Color"
description="Total row color"/>
<design:attribute name="TotalBgColor" label="Total Background"
description="Total row background color"/>
<design:attribute name="showBorder" label="Show Border"
description="Show Border"/>
<design:attribute name="showColumnBorder" label="Show Column Border"
description="Show Column Border"/>
<design:attribute name="coloring" label="Cell Coloring"
description="JSON conditions for cells coloring"/>
<design:attribute name="fieldLabels" label="Custom Field Labels"
description="{name:label} custom field labels map"/>
<design:attribute name="readOnlyFields" label="ReadOnly Fields"
description="',' separated list of readonly fields"/>
<design:attribute name="displayMode" label="Default Mode"
description="Default execution mode : read | edit"/>
</design:component>
Last updated
Was this helpful?