# Define a rule on a BOM line

> In a super BOM, define in which configuration a material line is included (option condition, expression condition) and how its quantity is calculated (characteristic × factor, expression).

URL: https://erpdocs.corexlogic.com/en/uretim/islemler/satir-kurali-tanimlama

- **Type:** Task
- **Module:** Manufacturing
- **Menu path:** Üretim › Ana Veriler › Ürün Ağaçları › ürün ağacı › revizyon › Düzenle (Production › Master Data › Bills of Materials › BOM › revision › Edit)
- **Screen route:** `/erp/manufacturing/boms/{id}/revisions/{revisionId}/edit`
- **Required permission:** `erp-manufacturing-boms.edit`
- **Prerequisites:**
  - The BOM's output card is configurable and its configuration characteristics are defined ([Define a configuration characteristic](https://erpdocs.corexlogic.com/en/uretim/islemler/yapilandirma-ozelligi-tanimlama)).
  - The BOM has an editable **draft** revision (a released revision does not change; open a new revision).

In a super BOM, each line is either **unconditional** (included in every order) or selected by a rule. The quantity can
be fixed or calculated from the configuration. The complete language and 25 examples:
[Conditions and formulas](https://erpdocs.corexlogic.com/en/uretim/kosullar).

## Steps

1. On the detail of the draft revision, click **Düzenle** (Edit).
   <!-- action: click · target: "Düzenle" · expect: "The Revizyon Düzenle (Edit Revision) form; a rule summary under each line (e.g. 'Koşulsuz — her konfigürasyonda gelir, miktar sabit.' (Unconditional — included in every configuration, fixed quantity.))" -->

   ![Super BOM draft — rule summary of the lines](https://erpdocs.corexlogic.com/en/en/img/screens/uretim/kosul-agac-satirlari.png)
   1. Rule summary — formula quantity
   2. Option condition and formula
   3. Edit Rule — Line Rule dialog
   4. In a formula line Quantity = constant part

2. On the line to receive a rule, click the **Kuralı Düzenle** (Edit Rule) button (the settings icon on the right of the line; screen reader name 'N. satırın kuralını düzenle' (Edit the rule of line N)).
   <!-- action: click · target: "9. satırın kuralını düzenle" · expect: "The Satır Kuralı — 9. satır (Line Rule — line 9) window" -->
3. If the line is to be included for specific options, check the values under the relevant characteristic (one value of the same characteristic is enough; different characteristics are required together). For a Yes/No characteristic, select **Fark etmez** (Any), **Evet** (Yes) or **Hayır** (No).
   <!-- action: choose · target: "Evet" · value: "Koruma Kapağı — Evet" -->

   ![Line Rule dialog — option condition and expression condition](https://erpdocs.corexlogic.com/en/en/img/screens/uretim/kosul-satir-kurali.png)
   1. Option condition — one of the ticked values (OR)
   2. Yes/No characteristic — written into the expression
   3. Expression condition — line comes when Yes
   4. Code buttons — insert at the cursor

4. If a numeric limit or several characteristics are needed, enter the expression in the **Koşul** (Condition) field of the **İfadeli koşul** (Expression condition) section; you can insert codes with the **Özellikler** (Characteristics) and value buttons. Check it with **Sına** (Test).
   <!-- action: fill · target: "Koşul" · value: "KORUMA = EVET" · expect: "İfade geçerli. Okunan özellikler: KORUMA. (Expression valid. Characteristics read: KORUMA.)" -->
5. In the **Formüllü miktar** (Formula quantity) section, select the mode: **Sabit miktar** (Fixed quantity), **Özellik × katsayı** (Characteristic × factor) (the **Özellik** (Characteristic) and **Katsayı** (Factor) fields) or **İfade** (Expression).
   <!-- action: choose · target: "İfade" -->
6. In expression mode, enter the formula in the **Miktar** (Quantity) field and click **Sına** (Test).
   <!-- action: fill · target: "Miktar" · value: "BOY * 2.4" -->

   ![Line Rule dialog — Check and formula quantity](https://erpdocs.corexlogic.com/en/en/img/screens/uretim/kosul-satir-kurali-miktar.png)
   1. Check — validation without saving
   2. Quantity mode: fixed, characteristic × factor, expression
   3. Quantity formula — added to the line quantity
   4. Apply — takes effect when the revision is saved

7. Close the window with **Uygula** (Apply). On a formula line, the form's **Miktar** (Quantity) field is the fixed part — enter `0` if only the formula is to give the quantity.
   <!-- action: click · target: "Uygula" -->
8. Save the revision with **Değişiklikleri Kaydet** (Save Changes).
   <!-- action: click · target: "Değişiklikleri Kaydet" -->

**Result:** The rule is written to the draft revision. Before releasing, test the extreme values with [Configure and Test](https://erpdocs.corexlogic.com/en/uretim/islemler/yapilandirarak-deneme); once the revision is released, new orders are resolved with this rule.

## What you need to know

- The option condition and the expression condition are required **together** (AND). If the expression condition is
  **Hayır** (No) or **unknown**, the line is not included.
- On a formula line, quantity = the **Miktar** (Quantity) field + the result of the formula; the result must be greater
  than zero.
- In **Özellik × katsayı** (Characteristic × factor) mode, only numeric characteristics (Tam Sayı (Integer), Ondalık
  (Decimal)) are listed; the factor must be greater than zero (`Formül katsayısı sıfırdan büyük olmalı.` — The formula
  factor must be greater than zero.).
- In expression mode, the expression cannot be left empty: `Miktar ifadesini yazın ya da sabit miktara dönün.` (Enter
  the quantity expression or return to a fixed quantity.)
- **Sına** (Test) checks the syntax and the codes; the result type (Yes/No, number) and value-dependent errors are shown
  only by Configure and Test or by releasing an order: [Messages](https://erpdocs.corexlogic.com/en/uretim/kosullar#iletiler).
- The same card can appear on two lines only if their option conditions exclude each other; the expression condition
  is not taken into account here (`Aynı stok kartı bir revizyonda yalnız bir malzeme satırında yer alabilir.` — The same
  stock card can appear on only one material line in a revision.).
- The window opens only in the BOM of a configurable output. For bulk entry, use the **SecimKosulu** and
  **MiktarFormulu** columns and the **Satır Koşulları** (Line Conditions) sheet of the Bills of Materials import
  workbook.

## Related

- [Conditions and formulas](https://erpdocs.corexlogic.com/en/uretim/kosullar)
- [Bills of materials](https://erpdocs.corexlogic.com/en/uretim/ekranlar/urun-agaclari)
