Template: KVPsTable

From Genesys Documentation
Jump to: navigation, search

Query template to generate tables of KVPs and their mappings to GIM. This template is a more general, Cargo equivalent of Template:KVPsDPL, which was developed for GMS/Callback.

Three optional parameters (|sourceDraft, |sourcePublished, and sourcePreview) provide flexibility for location of the single-sourced KVP content. If these options are not specified, the template will use a PONYDOCSVERSION of the Library book as the source for draft pages and a "<first two digits of PONYDOCSVERSION>Source" Library book for preview and released pages.

The first "client" for this template is GPR/GPM, which specifies the |KVPType parameter in the source material. This query template was modified in June 2018 for Chat/BGS, introducing an optional |noType parameter to enable suppression of the KVPType column in the query result. Another optional parameter introduced for Chat is |KVPCategory.

Usage[edit source]

{{KVPsTable|sourceDraft=<optional Library URL for unreleased>|sourcePublished==<optional Library URL for released>|sourcePreview==<optional Library URL for preview>|noType=<optional "yes" to suppress the KVP Type column>|KVPCategory=<optional filtering by the KVPCategory parameter specified in the KVP markup>}}

Content is:

{{#switch:{{{noType}}}
|yes={{#cargo_query:
tables=KVP
|fields=CONCAT(REPLACE(KVP,"_","_<wbr/>"),'<br/>',IF( (introduced IS NOT NULL),CONCAT('<br/><b>Introduced:</b> ',introduced),''),IF( (modified IS NOT NULL),CONCAT( '<br/><b>Modified:</b> ',modified),''),IF( (discontinued IS NOT NULL),CONCAT( '<br/><b>Discontinued:</b> ',discontinued),''))=KVP,CONCAT( KVPDesc,'\n',IF( (KVPDefault IS NOT NULL),CONCAT('<br/><b>Default value:</b> ',KVPDefault),''),IF( (KVPValid IS NOT NULL),CONCAT('<br/><b>Valid values:</b> ',KVPValid),''),IF((mandatoryForGIM IS NOT NULL),'<br/><br/><b>Note:</b> This KVP is mandatory for Genesys Info Mart reporting.','') )=Description,REPLACE(mapsTo,"_","_<wbr/>")=Info Mart Database Target
|where=_pageNamespace="{{NAMESPACENUMBER}}" AND _pageName="{{PAGENAME}}"
|format=dynamic table
|rows per page=100
}}
|no
|#default={{#cargo_query:
tables=KVP
|fields=CONCAT(REPLACE(KVP,"_","_<wbr/>"),'<br/>',IF( (introduced IS NOT NULL),CONCAT('<br/><b>Introduced:</b> ',introduced),''),IF( (modified IS NOT NULL),CONCAT( '<br/><b>Modified:</b> ',modified),''),IF( (discontinued IS NOT NULL),CONCAT( '<br/><b>Discontinued:</b> ',discontinued),''))=KVP,CONCAT( KVPDesc,'\n',IF( (KVPDefault IS NOT NULL),CONCAT('<br/><b>Default value:</b> ',KVPDefault),''),IF( (KVPValid IS NOT NULL),CONCAT('<br/><b>Valid values:</b> ',KVPValid),''),IF((mandatoryForGIM IS NOT NULL),'<br/><br/><b>Note:</b> This KVP is mandatory for Genesys Info Mart reporting.','') )=Description,KVPType=KVP Type,REPLACE(mapsTo,"_","_<wbr/>")=Info Mart Database Target
|where=_pageNamespace="{{NAMESPACENUMBER}}" AND _pageName="{{PAGENAME}}"
|format=dynamic table
|rows per page=100
}}
}}


KVP Description KVP Type Info Mart Database Target
KVP Description KVP Type Info Mart Database Target
{{{KVP}}}
{{{KVPDesc}}} Not mapped
Retrieved from "https://all.docs.genesys.com/Template:KVPsTable (2024-05-01 22:12:22)"