Jump to: navigation, search

KVPsTable2

Temporary template referring to Template:KVP2 to identify changes required for Chat.

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. The first "client" for this template is GPR/GPM.

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.

{{#cargo_query:
tables=KVP2
|fields=CONCAT(KVP2.KVP,'<br/>',IF( (KVP2.introduced IS NOT NULL),'<br/><b>Introduced:</b> ',''),IF( (KVP2.introduced IS NOT NULL),KVP2.introduced,''),IF( (KVP2.modified IS NOT NULL),'<br/><b>Modified:</b> ',''),IF( (KVP2.modified IS NOT NULL),KVP2.modified,''),IF( (KVP2.discontinued IS NOT NULL),KVP2.discontinued,''),IF( (KVP2.discontinued IS NOT NULL),'<br/><b>Discontinued:</b> ',''),IF( (KVP2.discontinued IS NOT NULL),KVP2.discontinued,''))=KVP,IF((KVP2.KVPValid IS NOT NULL),CONCAT(KVP2.KVPDesc,'<br/><b>Valid values:</b>\n',KVP2.KVPValid),KVP2.KVPDesc)=Description,KVP2.KVPType=KVP Type,KVP2.mapsTo=Info Mart Database Target
|where={{#switch:{{PONYDOCSSTATUS}}
|unreleased={{#switch:{{{sourceDraft}}}|{{{sourceDraft}}}=KVP2._pageName LIKE "{{{sourceDraft}}}"|#default=KVP2._pageName LIKE "%{{PONYDOCSPRODUCTSHORT}}:Library:%:{{PONYDOCSVERSION}}"}}
|preview={{#switch:{{{sourcePreview}}}|{{{sourcePreview}}}=KVP2._pageName LIKE "{{{sourcePreview}}}"|#default=KVP2._pageName LIKE "%{{PONYDOCSPRODUCTSHORT}}:Library:%:{{PONYDOCSVERSION}}"}}
|released|#default={{#switch:{{{sourcePublished}}}|{{{sourcePublished}}}=KVP2._pageName LIKE "{{{sourcePublished}}}"|#default=KVP2._pageName LIKE "%{{PONYDOCSPRODUCTSHORT}}:Library:%:{{#sub:{{PONYDOCSVERSION}}|0|3}}Source"}}}}
|format=dynamic table
}}


{{#cargo_query: tables=KVP2 |fields=CONCAT(KVP2.KVP,'
',IF( (KVP2.introduced IS NOT NULL),'
Introduced: ',),IF( (KVP2.introduced IS NOT NULL),KVP2.introduced,),IF( (KVP2.modified IS NOT NULL),'
Modified: ',),IF( (KVP2.modified IS NOT NULL),KVP2.modified,),IF( (KVP2.discontinued IS NOT NULL),KVP2.discontinued,),IF( (KVP2.discontinued IS NOT NULL),'
Discontinued: ',
),IF( (KVP2.discontinued IS NOT NULL),KVP2.discontinued,))=KVP,IF((KVP2.KVPValid IS NOT NULL),CONCAT(KVP2.KVPDesc,'
Valid values:\n',KVP2.KVPValid),KVP2.KVPDesc)=Description,KVP2.KVPType=KVP Type,KVP2.mapsTo=Info Mart Database Target
|where=KVP2._pageName LIKE "{{{sourcePublished}}}"

This page was last edited on March 8, 2018, at 20:32.
Comments or questions about this documentation? Contact us for support!