typeExtensions

Zuletzt geändert von Joel Schmalöer am 14.09.2022, 13:59

This page contains code examples for type extensions in feed/export.

Tested for PIM 8.22 | PXM 1.3.7

Note: Exports data regardless of a product affiliation.

Iterator

<#list typeExtensions as typeExtensionKey, typeExtension>
    ${typeExtensionKey}
</#list>

Example result

MC_MinRAM
MC_MemoryCapacity
MC_LicenseYears
CM_PitchCircle_Diameter
AverageTranslationEnrichment_de-DE
ProductEnrichmentLevelTranslation_Fallback
CM_Height
CM_CS_minHeight
tdc_0836
MC_DiagonalTV
tdc_0033
EF000040
...

All fields (JSON format)

{
    "typeExtensions" :
    <#list typeExtensions as typeExtensionKey, typeExtension>
    {
        "typeExtensionKey" : "${typeExtensionKey}",
        "type" : "${(typeExtension.type)!}",
        "valueListId" : "${(typeExtension.valueListId)!}",
        "defaultValue" : "${(typeExtension.defaultValue)!}",
        "unitOfMeasureId" : "${(typeExtension.unitOfMeasureId)!}",
        "layout" : "${(typeExtension.layout)!}",
        <#if (typeExtension.type)! == "date">
        "from" : "${(typeExtension.from)!}",
        "to" : "${(typeExtension.to)!}",
        </#if>
        <#if (typeExtension.type)! == "number">
        "max" : "${(typeExtension.max)!}",
        "min" : "${(typeExtension.min)!}",
        "step" : "${(typeExtension.step)!}",
        </#if>
        <#if (typeExtension.type)! == "string" || (typeExtension.type)! == "text-table">
        "minLength" : "${(typeExtension.minLength)!}",
        "maxLength" : "${(typeExtension.maxLength)!}",
        "pattern" : "${(typeExtension.pattern)!}",
        </#if>
        <#if (typeExtension.type)! == "text-table">
        "schemaId" : "${(typeExtension.schemaId)!}",
        </#if>
    }
    </#list>
}

Example result

{
   "typeExtensions" :
    {
       "typeExtensionKey" : "tdc_1611",
       "type" : "number",
       "valueListId" : "tdc_1611_VL",
       "defaultValue" : "",
       "unitOfMeasureId" : "",
       "layout" : "",
       "max" : "999",
       "min" : "0",
       "step" : "",
    }
    {
       "typeExtensionKey" : "tdc_0026",
       "type" : "string",
       "valueListId" : "",
       "defaultValue" : "",
       "unitOfMeasureId" : "",
       "layout" : "",
       "minLength" : "0",
       "maxLength" : "20",
       "pattern" : "",
    }
}
Tags: