Create a table in the print layout to show the current display products in a store. You
can see details, such as the name and description of the products, the customer, the type, and
the competitor.
Required Editions
| Available in: Professional, Enterprise, and Unlimited Editions
that have Consumer Goods Cloud enabled |
| User Permissions Needed |
| To create a table for the current display fields: |
CG Cloud Developer AND Admin |
-
Open Visual Studio Code-based Modeler.
-
In your Modeler workspace, enter this code snippet in the Report Layout section of the
MyDisplayPDF.printlayoutv2.xml contract located at
$workspace/src/MyDisplay/PL/MyDisplayPDF.
<!--Current Display -->
<h2 alignment="center">{{Labels::CurrentDisplayId; defaultLabel=Current Display}}</h2>
<table name="CurrentDisplayTable" dontBreakRows="false" tableLayout="noBorders">
<tbody>
<tr>
<td alignment="right" width="100">{{Labels::NameId; defaultLabel=Name:}}</td>
<td alignment="left" width="130">{{Declarations::currentDisplay.name}}</td>
<td alignment="right" width="100">{{Labels::CustomerId; defaultLabel=Customer:}}</td>
<td alignment="left" width="130">{{Declarations::currentDisplay.luCustomer.name}}</td>
</tr>
<tr>
<td alignment="right">{{Labels::DescriptionId; defaultLabel=Description:}}</td>
<td>{{Declarations::currentDisplay.description}}</td>
<td alignment="right">{{Labels::TypeId; defaultLabel=Type:}}</td>
<td>{{Declarations::currentDisplay.type; toggleId=DomDisplayType; toggleField=text}}</td>
</tr>
<tr>
<td alignment="right">{{Labels::CompetitorId; defaultLabel=Competitor:}}</td>
<td>{{Declarations::currentDisplay.competitorDisplay; toggleId=DomBool; toggleField=text}}</td>
<td/>
<td/>
</tr>
</tbody>
</table>
-
Save your changes.