# Line Item editor setup

**Set the properties of the Line-item editor. You can define which fields to include (e.g. price, discount, quantity, etc) for each record that gets selected.**

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FBujnp7fPZVrtxTg0xPXl%2Fimage%20(2).png?alt=media&#x26;token=e1031f03-5246-4bc3-8718-15d7f22704ea" alt=""><figcaption></figcaption></figure>

### Settings

* [**Column settings**](#column-settings)

  Select the fields that you want to appear in the Line-item editor, from all available fields in your Line-item object. You can also set default values and the layout for each field.
* [**Advanced settings**](#advanced-settings)

  You can specify minimum and maximum values for each field, custom calculation formulas, image settings and more.
* [**Add data sources**](#add-data-sources)

  As well as the linked objects we have configured already, you can pull data from other SalesForce objects or from external systems.

***

### Column settings

Select the fields that you want to appear in the Line-item editor, from all available fields in your Line-item object. You can also set default values and the layout for each field.

<table><thead><tr><th width="201">Item</th><th width="449">Description</th><th>Req.</th></tr></thead><tbody><tr><td>Order</td><td>The display order of the columns.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>API Name</td><td>The API name of the field in the target object.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Label</td><td>The label displayed in the header for the column.</td><td><mark style="color:red;">✔️</mark></td></tr><tr><td>Default Value</td><td>When a Line-item is first added, the field will take this default value.</td><td></td></tr><tr><td>Source Field</td><td>When a Line-item is first added, the field will populate based on the specified field from the Parent or Lookup objects.</td><td></td></tr><tr><td>Width (px)</td><td>Specify the width of the column in pixels.</td><td></td></tr><tr><td>Text Align</td><td>Specify the alignment of the values in the columns. Default is left-aligned.</td><td></td></tr><tr><td>Read Only</td><td>Displays data from the existing record, but prevents the user from editing it.</td><td></td></tr><tr><td>Required</td><td>Specifies that the field cannot be empty when the Line-items are saved.</td><td></td></tr><tr><td>Summary</td><td>Tick this box to display a sum total of this column at the bottom right of the editor.<br>(<a href="basicinfo">View Summary</a> must be enabled.)</td><td></td></tr><tr><td>Hidden</td><td>Makes the column hidden from view.</td><td></td></tr><tr><td>Don't Save</td><td>Doesn't save any changes made to this value in the editor. This will be necessary for some configurations where for example you can display a price and a calculated total at the same time, and SalesForce will not allow you to simultaneously save both values.</td><td></td></tr></tbody></table>

### Advanced settings

You can specify minimum and maximum values for each field, custom calculation formulas, image settings and more.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FK1tnfSdRufyBv8f7u3R6%2Fimage%20(3).png?alt=media&#x26;token=785bf803-6699-45c0-9146-92183b8fb7a4" alt="" width="563"><figcaption></figcaption></figure>

<table data-full-width="false"><thead><tr><th width="209.33333333333331">Setting</th><th width="234">Properties</th><th>Description</th></tr></thead><tbody><tr><td>Number</td><td>Min</td><td>If the column is numeric, you can set a minimum value.</td></tr><tr><td></td><td>Max</td><td>If the column is numeric, you can set a maximum value.</td></tr><tr><td>Calculation</td><td>Order</td><td>Specifies the calculation order of the columns.</td></tr><tr><td></td><td>Operator</td><td>Set the calculation for the column. You must refer to other columns by their API name.</td></tr><tr><td>Discount Calculation</td><td>Apply Discount Calculator</td><td>Enables the in-line discount calculation feature.</td></tr><tr><td></td><td>Original Price Field</td><td>Specify the field to take the original price from, to apply the discount.</td></tr><tr><td></td><td>Discount Rate Field</td><td>Specify a field to store the discount rate in (optional).</td></tr><tr><td></td><td>Rounding method</td><td>Choose a rounding method for discount calculations: Round (to nearest), Round Up, or Round Down.</td></tr><tr><td></td><td>Level of Precision</td><td>Sets the degree of precision when rounding.</td></tr><tr><td>Image</td><td>Image</td><td>Check if the column is an image. The value of the column must be an image URL.</td></tr><tr><td></td><td>Width</td><td>If the column is an image, specifies the width of the image in pixels.</td></tr><tr><td></td><td>Height</td><td>If the column is an image, specifies the height of the image in pixels.</td></tr><tr><td>Reference</td><td>Keyword Field</td><td>Lookup</td></tr><tr><td></td><td>Filter</td><td>If the column is a field from the Lookup object, specify a filter here.<br>Write the <code>WHERE</code> clause in SOQL.</td></tr><tr><td>Etc (other)</td><td>Read Only Controller Field</td><td>Defines that the column is read-only, based on the value of the chosen field (which must be true or false).</td></tr></tbody></table>

### Add data sources

If you want a field to show data from other Salesforce objects, or from external systems, you can set up a DataSource appropriately.

{% content-ref url="datasource" %}
[datasource](https://help.smallbuilder.com/smallbuilder-line-items/setup/datasource)
{% endcontent-ref %}
