--- title: "How Do I Use the Group Until Functionality in the Form Editor?" slug: "use-the-group-until-functionality-in-the-form-editor" description: "How to create a group of patterns in the Form Editor starting at the instance of a pattern and ending when meeting the same or another defined pattern." updated: 2024-06-19T14:14:28Z published: 2024-06-19T14:14:28Z canonical: "kb.lasernetgroup.com/use-the-group-until-functionality-in-the-form-editor" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # How Do I Use the Group Until Functionality in the Form Editor? This article describes how to create a group of patterns in the Form Editor, starting at the instance of a pattern and ending when meeting the same or another defined pattern. This is useful if you want to group a list of item lines and perform unique actions at the start or at the bottom of the group. For example, an action could be to insert a text, shape, or run a calculation. In the following example input data contains detail lines, which must be grouped based on the contents of the line type. Because all detail lines have the same Xpath **/Report/DatasetTable1/Grouping1_0_Collection/Grouping1_0/Detail_Collection/Detail**, we will use the contents of the **LineType** as a part of the Xpath to differ between headers (**A**) and lines (**O**). 1. Select the **Pattern** tool to display the **Pattern Properties** window. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-9GKLW5RK.png) 1. Click the **Output** tab, select the **Group until** checkbox and set **Match** to the same value as that defined for your **Pattern Name**/**Criterion** in the input settings of the pattern. 2. In **Additional progress**, set the value to **10 mm** to insert additional space between groups. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1619617096156.png) Any further patterns will now be included in the group until a new line type **A** is matched. 1. Click value **O** for element **FIELD_PBS_AgreementLineTmp_LineType** to create a pattern recognizing item lines. 2. Select the **Rearrange** tool. 3. Click the elements for **LineType** and **ItemId** for **LineType A** and drag the values to the position required for the headings. 4. Click the elements for **LineType**, **ItemId**, and **Qty** for **LineType O** and drag the values to the position required for the item lines. 5. Select the object containing the quantity in the output view to summarize the column. 6. Select the **Calculation** tool > **Sum Group** option (icon is active when a column is selected). A new script function object named **SumGroup()** will automatically be added relative to **Bottom of group**. 1. Select **Insert Text** tool and **Shape**, **Create Lines,** **Shapes** and then the **Lines** tool to add a total text and line in **Bottom of group**. 2. In the output properties for both objects, click the **Relative** tab and set **Relative to** value **Bottom of group**. 3. Set **Group value** to the group name available in the group list. The item lines are now grouped based on line type with a unique design for header, item lines and the bottom of the group. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1619617833549.png)