Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
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
          Number Badge for Buttons in Lists

          Number Badge for Buttons in Lists

          Consumer Goods (CG) Cloud Mobile App Framework supports the display of number badge for buttons in lists. This feature enables CG Cloud Offline Mobile App users to track facts such as number of images captured and attached to the current list item task. This is possible by using an additional attribute, badgeText, in the binding element of the Button type and the Dynamic type in UI controls.

          Required Editions

          Available in: Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled.

          The additional attribute is used in these UI controls:

          • GroupedList
          • EmbeddedList
          • BreadCrumbControl
          • MultiSelectionGroupedList
          • MultiSelectionBreadCrumbControl
          Numner Badge for List Buttons

          The number badge is displayed for buttons in lists only if the following conditions are true:

          • The badgeText attribute is present in the binding element of the Button type and the Dynamic type.
          • The badgeText attribute contains a valid value.

          The badgeText attribute value must be prefixed with a dot (.) and must be followed by alphanumeric characters. For example, if the badgeText attribute value refers to a simple property of the bound list, the simple property value must be a single number or a single character. The value, #, is displayed on the number badge for buttons in lists if the length of the simple property value exceeds one number or one character. If the value is longer than 500 characters or is a string, the value is rejected and an error isn’t logged.

          The badge doesn’t change on the pressed state of the corresponding button.

          Example
          Example
          <GroupedList name="myList" searchable="true" dataSource="ProcessContext::OverviewList.Items[]">
            <Items name="Items" itemPattern="myItemPattern">
              <ItemListLayout>
                <Default>
                  <Col width="10em">
                    <Row layoutType="ItemSecondary" bindingId="Button1" />
                  </Col>
                </Default>
              </ItemListLayout>
              <Bindings>
                <!-- needs to be a Binding per list item not a Resource to allow for EA rights via ACL on the list -->
                <Binding target="Button1" type="Button" binding=".displayedImageId" bindingMode="ONE_WAY" imageType=".svg" longPressMenuId="longPressMenu1" badgeText =".badgeText"/>
                <Binding target="Button2" type="Button" binding=".displayedImageId2" bindingMode="ONE_WAY" imageType=".svg" longPressMenuId="longPressMenu2" badgeText =".badgeText"/>
              </Bindings>  
          <!-- left out other details for brevity -->
          </GroupedList>
          <GroupedList name="myList" searchable="true" dataSource="ProcessContext::OverviewList.Items[]">
            <Items name="Items" itemPattern="myItemPattern">
              <ItemListLayout>
                <Default>
                  <Col width="10em">
                    <Row layoutType="ItemSecondary" bindingId="Button1" />
                  </Col>
                </Default>
              </ItemListLayout>
              <Bindings>
                <!-- needs to be a Binding per list item not a Resource to allow for EA rights via ACL on the list -->
          <Binding target="buttonImageIcon" type="Dynamic" typeField="variantType" binding=".buttonImageIcon" bindingMode="ONE_WAY" imageType=".svg" longPressMenuId="longPressMenu1" badgeText =".badgeText"/>
              </Bindings>  
          <!-- left out other details for brevity -->
          </GroupedList>
           
          Loading
          Salesforce Help | Article