# Creating a List Configurator Manually

### 🔸 Creating the Component Directly

In addition to creating a tab through the builder, you can add the list configurator anywhere using the Aura Component `<SBLS:ListConfigurator />`.

```html
<aura:component >
    <SBLS:ListConfigurator configurationid="{BUILDER_RECORD_ID}" />
</aura:component>
```

***

### :small\_orange\_diamond: Aura Component Attributes

<table><thead><tr><th width="222.3359375">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>configurationId</strong></td><td>The record ID of the builder.</td></tr><tr><td><strong>height</strong></td><td>The height of the configurator (unit: px). The default value is 500px.</td></tr><tr><td><strong>parentFieldApiName</strong></td><td>When adding the configurator as a related list on a record page, specify the API name of the field that references the list configurator object from the record page object.</td></tr><tr><td><strong>recordId</strong></td><td>When adding the configurator as a related list on a record page, set this to the record ID of the record page object.</td></tr><tr><td><strong>hideFilters</strong></td><td>Hides the configured filters.</td></tr><tr><td><a href="#passing-filter-values"><strong>filters</strong></a></td><td><strong>Use the filters attribute to set default filter conditions for the list.</strong> This attribute accepts filter values in a <strong>JSON array format</strong>, and the specified conditions will be automatically applied when the list is loaded.</td></tr></tbody></table>

***

### :small\_orange\_diamond: Example: Creating a Component

#### Creating a Component for a Tab

If your organization or profile has IP restrictions, you may not be able to use the builder’s tab creation feature. In such cases, you need to create a tab manually by writing an Aura Component.

<pre class="language-html"><code class="lang-html">&#x3C;aura:component implements="force:appHostable">
<strong>    &#x3C;SBLS:ListConfigurator configurationid="{BUILDER_RECORD_ID}" height="null" />
</strong>&#x3C;/aura:component>
</code></pre>

{% hint style="warning" %}
When manually creating a tab with a component, set the height attribute to null.

This allows the list configurator to automatically adjust its height within the tab for optimal display.
{% endhint %}

#### Manually Creating a Component for a Related List

If you want to embed a list configurator for Opportunity Products (OpportunityLineItem) on an Opportunity (Opportunity) record page, you can create an Aura Component as follows:

<pre class="language-html"><code class="lang-html">&#x3C;aura:component implements="force:hasRecordId">
    &#x3C;SBLS:ListConfigurator 
        configurationid="{BUILDER_RECORD_ID}"
<strong>        parentFieldApiName="OpportunityId"
</strong><strong>        recordId="{!v.recordId}" />
</strong>&#x3C;/aura:component>
</code></pre>

#### Passing Filter Values

Let’s say you have an Aura Component named `OpportunityProductList.cmp` that displays **a list of** **Opportunity Products**:

{% code title="OpportunityProductList.cmp" %}

```html
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
    <SBLS:ListConfigurator 
        configurationId="{Builder_Record_ID}"
        parentFieldApiName="OpportunityId"
        recordId="{!v.recordId}" />
</aura:component>
```

{% endcode %}

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FukFD6R8DYzDXzivIweqJ%2Ffilter_default_Result1.png?alt=media&#x26;token=649188d8-e89a-444d-a06d-81abc4fc0e62" alt=""><figcaption><p>OpportunityProductList.cmp</p></figcaption></figure>

Assume the Opportunity Product list has the following filters:

* **ProductCode**: contains ‘CLOUD’
* **Quantity**: greater than 1
* **ServiceDate**: between 2025-06-01 and 2025-12-31

To apply these default values, modify the component like this:

<pre class="language-html" data-title="OpportunityProductList.cmp"><code class="lang-html">&#x3C;aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">
<strong>    &#x3C;aura:attribute name="filters" type="Object" />
</strong><strong>    &#x3C;aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</strong>    &#x3C;SBLS:ListConfigurator 
        configurationId="{Builder_Record_ID}"
        parentFieldApiName="OpportunityId"
        recordId="{!v.recordId}"
<strong>        filters="{!v.filters}" />
</strong>&#x3C;/aura:component>
</code></pre>

* The **`filters`** attribute is used to set default filter conditions for the list.
* It accepts a **JSON array** and the specified filters will be automatically applied when the list loads.
* The **`<aura:handler name="init" />`** tag is used to initialize the filter values when the component loads.

Controller example (OpportunityProductListController.js):

{% code title="OpportunityProductListController.js" %}

```javascript
({
    doInit : function(component, event, helper) {
        component.set("v.filters", [
            {
                fieldApiName: 'ProductCode',
                value: 'CLOUD'
            },
            {
                fieldApiName: 'Quantity',
                value: 1,
                operator: 'greater_than'
            },
            {
                fieldApiName: 'ServiceDate',
                value: {
                    from: '2025-06-01',
                    to: '2025-12-31'
                }
            }
        ]);
    }
})
```

{% endcode %}

You will see that the list is loaded with the filter values you specified in the component.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FLAnVILz5XeNfH94jBrc9%2Ffilter_default_Result2.png?alt=media&#x26;token=f2dbea95-3fc0-41e5-9ab5-cbdf04cbdb4d" alt=""><figcaption></figcaption></figure>

#### filters Attribute

The filters attribute is used to apply default filter conditions to the list. It accepts an array of filter objects, each with the following properties:

<table><thead><tr><th width="162.3515625">Attribute</th><th>Value</th></tr></thead><tbody><tr><td><strong>fieldApiName</strong></td><td>The API name of the field to apply the filter to.</td></tr><tr><td><strong>value</strong></td><td>The value to filter by. For number or date ranges, use an object with <code>from</code> and <code>to</code> properties.</td></tr><tr><td><strong>operator</strong></td><td><p>Used to define comparison logic for number or date filters.</p><p>Supported operator values:</p><ul><li><strong><code>equals</code></strong>: Equal to</li><li><strong><code>not_equal_to</code></strong>: Not equal to</li><li><strong><code>less_than</code></strong>: Less than</li><li><strong><code>greater_than</code></strong>: Greater than</li><li><strong><code>less_or_equal</code></strong>: Less than or equal to</li><li><strong><code>greater_or_equal</code></strong>: Greater than or equal to</li></ul></td></tr></tbody></table>
