Skip to content

Configuration

Showing what is header and what is sub header

Addon config

  1. Go to Lime Admin -> Settings -> Limeobject Summary -> Summary items and add a new item.
  2. Give it a unique name (Used as a reference in the view config later).
  3. Select what limetype it should summarize (i.e. what relation field it should replace)
  4. Add header items (headers/sub headers), see instructions below

Header items

The configuration for header and sub header are the same, the only difference is where they are shown.

See picture above on what they look like.

Header items have some common configuration and also some specific based on what type you select.

Common properties

Name Type Required Description
Type Field or Aggregate Yes What type of header item it is, see types Field and Aggregate
Icon String No What icon to show before value
Icon color String No What color of the above icon
Prefix String No What prefix to have on the value, will be translated if it's a translation key
Suffix String No What suffix to have on the value, will be translated if it's a translation key

Type (Field)

Show a field on the lime object (i.e. company name)

Name Type Required Description
Field name String Yes What field to show

Type (Aggregate)

Show an aggregation of a related tab (i.e. number of active helpesk tickets)

Name Type Required Description
Relation tab String Yes What relation tab to fetch data from
Filter String No What filter to use (i.e. only active), leave empty for all
Calculate Average, Count, Min, Max or Sum Yes How to aggregate result
Value String No What field to fetch value from when using Calculate = Average, Min, Max or Sum

View config

Make sure that you've created a summary item in the Addon config first. And remember (or copy) the name you gave it.

  1. Go to the card view of the card you'd like to replace a relation picker for.
  2. Navigate to the relation field you'd like to replace and set the following values in the Web component section of the field:
    • Name:
      lwc-limepkg-limeobject-summary-relation-picker
      
    • Properties:
      {
          "name": "<Name of your configured Summary item>"
      }
      

Advanced configuration (Inherit values to inline create)

In Properties under Web component it's possible to add inheritValues, where you define what values to pre-fill on the inline create form.

The structure of the configuration looks like this:

{
    "inheritValues": {
        "<field to pre-fill in the form>": {
            "fromProp": "<field name on active object to fetch value from>", // Optional
            "value": "<hard coded value to set in form>", // Optional
            "format": { // Optional
                "capitalize": true|false, // Optional - If it should make first character upper case
                "regex": "<regular expression for extracting information from value>" // Optional
            }
        }
    }
}

If you're new to writing regular expression, We can recommend this tool regex101

Example Person Configuration

This example is from using it on Person relation field on a ticket (see How It Works).

{
    "name": "helpdeskperson",
    "inheritValues": {
        "email": {
            "fromProp": "email"
        },
        "phone": {
            "fromProp": "phone"
        },
        "firstname": {
            "fromProp": "email",
            "format": {
                "regex": "^[a-zA-Z]+",
                "capitalize": true
            }
        },
        "lastname": {
            "fromProp": "email",
            "format": {
                "regex": "[a-zA-Z]+(?=@)",
                "capitalize": true
            }
        }
    }
}

Inherit values configuration explanation

{
    "name": "helpdeskperson",
    // Name of the Limeobject summary item in Lime Admin
    "inheritValues": {
        // Set value on field "email" on the person
        "email": {
            "fromProp": "email" // Fetch the value from the field "email" on the helpdesk
        },
        // Set value on field "phone" on the person
        "phone": {
            "fromProp": "phone" // Fetch the value from the field "phone" on the helpdesk
        },
        // Set value on field "firstname" on the person
        "firstname": {
            "fromProp": "email", // Fetch the value from the field "email" on the helpdesk
            "format": {
                "regex": "^[a-zA-Z]+", // From the start of the value, extract all characters until not a-z (i.e [email protected] would extract "first")
                "capitalize": true // Capitalize value
            }
        },
        // Set value on field "lastname" on the person
        "lastname": {
            "fromProp": "email", // Fetch the value from the field "email" on the helpdesk
            "format": {
                "regex": "[a-zA-Z]+(?=@)", // Extract all characters between a non a-z and a @ (i.e [email protected] would extract "last")
                "capitalize": true // Capitalize value
            }
        },
        // Set value on field "inactive" on the person
        "inactive": {
            "value": false // Use value false
        }
    }
}