Loading
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create a Filtered List for Product Displays

          Create a Filtered List for Product Displays

          Create filtered lists in print layout to show the product displays of manufacturer and competitors in a store. You can see details, such as the name and description of the products, and the number of competitor displays.

          Required Editions

          Available in: Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
          User Permissions Needed
          To create a filtered list for own and competitor displays: CG Cloud Developer AND Admin
          1. Open Visual Studio Code-based Modeler.
          2. 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.
            <!-- Own Displays -->
            <h2 alignment="center">{{Labels::OwnDisplaysId; defaultLabel=Own Displays}}</h2>
            <table tableLayout="headerLineOnly" name="OwnDisplayTable">
              <thead>
                <tr>
                  <th width="150">{{Labels::OwnDisplayNameId; defaultLabel=Name}}</th>
                  <th width="250">{{Labels::OwnDisplayDescriptionId; defaultLabel=Description}}</th>
                  <th width="100">{{Labels::OwnDisplayCompetitorId; defaultLabel=Competitor Display}}</th>
                </tr>
              </thead>
              <tbody>
                <each name="itemsEach" value="{{Declarations::loDisplays}}">
                  <filters>
                    <filter fieldName="competitorDisplay" value="0" operator="EQ" />
                  </filters>
                  <tr>
                    <td>{{.name}}</td>
                    <td>{{.description}}</td>
                    <td>{{.competitorDisplay}}</td>
                  </tr>
                </each>
              </tbody>
            </table>
            
            
            <!--Competitor Displays -->
            <h2 alignment="center">{{Labels::CompetitorDisplaysId; defaultLabel=Competitor Displays}}</h2>
            <table tableLayout="headerLineOnly" name="OwnDisplayTable">
              <thead>
                <tr>
                  <th width="150">{{Labels::CompetitorDisplayNameId; defaultLabel=Name}}</th>
                  <th width="250">{{Labels::CompetitorDisplayDescriptionId; defaultLabel=Description}}</th>
                  <th width="100">{{Labels::CompetitorDisplayCompetitorId; defaultLabel=Competitor Display}}</th>
                </tr>
              </thead>
              <tbody>
                <each name="itemsEach" value="{{Declarations::loDisplays}}">
                  <filters>
                    <filter fieldName="competitorDisplay" value="1" operator="EQ" />
                  </filters>
                  <tr>
                    <td>{{.name}}</td>
                    <td>{{.description}}</td>
                    <td>{{.competitorDisplay}}</td>
                  </tr>
                </each>
              </tbody>
            </table>
            
          3. Save your changes.
          4. To check for validation errors, build your contracts by running sf mdl build.
           
          Loading
          Salesforce Help | Article