Loading
Create a Public Property for a Flexcard LWC in the Flexcard Designer (Managed Package)

Create a Public Property for a Flexcard LWC in the Flexcard Designer (Managed Package)

For the managed package runtime, in the Flexcard Designer, define an attribute that creates a public property whose value is set in the Lighting App Builder and Experience Builder. Call the attribute within the Flexcard as a session variable ({Session.AttName}) where merge fields are supported, such as in a Text element and a data source parameter.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

For example, enable an admin to limit the number of records displayed on a Flexcard on a record page. Enter the session variable in a SOQL query, such as where Limit = {Session.RecordLimit}.

Public properties are published to the configuration file that defines the metadata values for your Flexcard LWC. Additional metadata values are configurable in the Designer with the Publish Options feature when your card is active.

Required Versions

Available beginning Winter '22.

  1. In the Flexcard Designer, select Setup to open the Setup panel.
  2. Click + Add New next to Exposed Attributes, and enter the values for the following properties:
    • Attribute: The name of the attribute in PascalCase, such as RecordLimit.

      The generated API name is cfPropName. From a Custom LWC or an Omniscript, reference the property name in kebab case, such as cf-record-limit.

    • Type: Select the type of property from the dropdown:

      • Select String to display a text field whose value must be text.

      • Select Boolean to display a checkbox that evaluates to true when checked and false when not checked.

      • Select Number to display a text field whose value must be a number.

    • Targets: Select one or more page types for which this property is visible.

      To view the property in an Experience Builder site, select lightningCommunity__Default.

    • Label: Enter the property label, such as Record Limit.

    • (Optional) Value: Enter a default value.

  3. Click Save.
  4. To call the attribute as a session variable within the Flexcard, use the {Session} merge field. For example, if your Attribute name is RecordLimit, enter {Session.RecordLimit}. Use {Session.RecordLimit} in fields where merge fields are supported, such as in a Text element, a data source's test and input parameters, and a Field element's Output property.
  5. Activate your Flexcard.
  6. Configure where your Flexcard can be published, such as a Lightning page or an Experience Builder site.
  7. Add your active Flexcard to a Lightning or Experience page.
  8. To configure the public property in the Lightning App Builder or Experience Builder, update the value of the property in the Builder's properties panel.
    FlexCard Experience Builder Properties Panel
    FlexCard Lightning App Builder Properties Panel
 
Indlæser
Salesforce Help | Article