Merge fields configuration
On this page you can configure custom merge fields (content controls) used in WorkZone for Office and WorkZone 365. You can do that by extending the existing standard WzoConfigurations configuration with the custom menuDescription and mergeOdataDescription configurations. See About merge fields configuration and Merge fields configuration files for more information.
menuDescription and mergeOdataDescription configuration files, WorkZone Configurator will check whether your code is valid, but it is your responsibility to evaluate how your changes will affect the existing WorkZone configuration. Edit a merge fields configuration
- On the start page, click Office.
- Select the Merge fields configuration tab.
- Hover the mouse over the
Action button for the needed configuration file, and select Edit.
- In the edit configuration dialog, make the needed changes in the
merge_odata_description.xmland/ormenuDescription.xmlfiles. See Merge fields configuration files for more information.
For example, you want to add the IsParentFile property to a case, and have it localized into four different languages.
- Update the
merge_odata_description.xmlfile as follows:Kopiér<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<!-- Identity transform: copy everything by default -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!--
Once you are inside the specific staticData (id + query), hit the 'Started' property,
copy that property, and append the new IsParentFile property immediately after it.
-->
<xsl:template match="
staticData[@id='0D63624F-21A0-4AE3-B3A2-A542ACE0C5EB'
and normalize-space(@query) = "Files('{fileId}')"]
/property[@id='C1EBA46A-596D-4A7B-B05F-606533CD9B84' and @name='Started']
">
<!-- Copy the original 'Started' property -->
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<!-- Insert the new property immediately after -->
<property id="A1234567-89AB-CDEF-0123-456789ABCDEF" name="IsParentFile"/>
</xsl:template>
</xsl:stylesheet>where:
- Kopiér
<xsl:template match="
staticData[@id='0D63624F-21A0-4AE3-B3A2-A542ACE0C5EB'
and normalize-space(@query) = "Files('{fileId}')"]
/property[@id='C1EBA46A-596D-4A7B-B05F-606533CD9B84' and @name='Started']
">content is added to
staticData, which contains list of all properties from the case. You need to add it after theStartedproperty. - Kopiér
<property id="A1234567-89AB-CDEF-0123-456789ABCDEF" name="IsParentFile"/>is the node that you are adding.
Idis a unique GUID, andnameis the property name from OData.
- Update the
menuDescription.xmlfile as follows:Kopiér<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>
<!-- Identity transform -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- Add new label under <labels> -->
<xsl:template match="labels">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<!-- New label entry -->
<label dataItemRef="A1234567-89AB-CDEF-0123-456789ABCDEF">
<value xml:lang="en-GB" format="{{0}} (text)">IsParentFile EN</value>
<value xml:lang="da-DK" format="{{0}} (tekst)">IsParentFile DA</value>
<value xml:lang="de-DE" format="{{0}} (text)">IsParentFile DE</value>
<value xml:lang="ja-JP" format="{{0}} (テキスト)">IsParentFile JP</value>
</label>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>where:
- Kopiérdefines localized labels for the IsParentFile field that you have added.
<label dataItemRef="A1234567-89AB-CDEF-0123-456789ABCDEF">
<value xml:lang="en-GB" format="{{0}} (text)">IsParentFile EN</value>
<value xml:lang="da-DK" format="{{0}} (tekst)">IsParentFile DA</value>
<value xml:lang="de-DE" format="{{0}} (text)">IsParentFile DE</value>
<value xml:lang="ja-JP" format="{{0}} (テキスト)">IsParentFile JP</value>
</label> - Kopiérmust match the GUID that you have created earlier.
dataItemRef="A1234567-89AB-CDEF-0123-456789ABCDEF"
Delete a merge field configuration
menuDescription and mergeOdataDescription configuration files, the standard WorkZone WzoConfigurations configuration will be used. - On the start page, select Office > Merge fields configuration.
- Hover the mouse over the
Action button for the needed configuration file, and select Delete.
- In the confirmation dialog, click Delete.