--- title: "Subforms (XML, EDI, JSON) - Lasernet 9 Form Editor Training" slug: "subforms-xml-edi-json" description: " In this exercise, you can learn how to add subforms to an output of the EDI format, and then edit it, as needed. Read for more information." tags: ["EDI", "JSON", "Lasernet 9 ", "Subforms", "XML"] updated: 2026-03-06T07:57:51Z published: 2026-03-06T07:57:51Z canonical: "kb.lasernetgroup.com/subforms-xml-edi-json" --- > ## 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. # Subforms (XML, EDI, JSON) **Applies to:** Lasernet 9 You can also add subforms for output formats such as XML, EDI, and JSON. The procedure is the same for all the mentioned output formats. In this exercise, you can learn how to add subforms to an output of the EDI format and then edit it as needed. > [!NOTE] > Note > > This article describes a software version that is no longer supported. Although the software will no longer receive updates or technical support, existing documentation, such as this article, will be retained for reference purposes but will no longer be updated. If you have any questions, contact [Lasernet Support](https://support.lasernetgroup.com/new-ticket). ## Exercise Download and import the attached configuration called **38. Subforms (XML, EDI, JSON) in Lasernet Developer 9**. Afterward, navigate to the **Forms** section and open the **Sample** form. Once the **Sample** form is open, start adding subforms to the EDI output format. To this end, follow these steps: 1. On the **Developer** toolbar, click the down-pointed arrow next to the **Subform** tool. 2. On the menu that appears, click **Insert Global Subform…**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179730TPNQTXQQITTBZPZ0-image.png) 1. After you have chosen a subform type, the mouse cursor changes its view. Click the EDI node (the root one) in the output to insert the subform. 2. As a result, the **Subform** dialog appears. To add a global subform, click the **Add** button. 3. In the subform properties dialog that appears, define the subform name (UNB). Once you are done, click the **OK** button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179803CVLZYJURGPWAVGQ0-image.png) 1. Once you are back to the **Subform** dialog appears, click the **Edit** button. 2. In the editor that appears, first, switch to the **Template** tab, and then insert the **UNB+UNOA:2+FPSOFTWARE+HUBERGMBH+990802:1557+9908021557'** string as shown in the following image. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179819IDXKREFKQFJGARD0-image.png) 1. Then, switch to the **XML** tab, and then expand the EDI node. 2. Change properties for every value node by defining to use the default value for each of them if no rearrange data is provided. To this end, double-click a node in the output to edit its properties, and then select the Use default value if no rearrange data is provided check box in the dialog that appears. Once you are done, click **OK**. Do it for every single value node available in the output. As a result, you can see that the value of each node is not dimmed anymore and is shown in black. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179820KHGVMFRFSZDZFHA0-image.png) 1. Once you are done, save the changes you have made by clicking the **Save** button and closing the editor. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179918EDBMSDJDYONTNQS0-image.png) 1. Confirm inserting the global subform you have just added and edited by clicking the **OK** button in the **Subform** dialog. As a result, the subform is inserted into the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179920KOHCSISRHZESTWQ0-image.png) Repeat steps 1-11 to insert the following subforms by specifying the proposed string for them and editing the value node properties: | Global subform name | String | | --- | --- | | UNH | UNH+INVOIC0001+INVOIC:D:93A:UN' | | BGM | BGM+380+9908001+9' | | RFF | RFF+ON:O0010001' | | DTM | DTM+4:19999715:102' | As a result, your output looks as follows: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179935BIKORZCKTZPSBPR0-image.png) 1. Add once again a global subform called **DTM**. Start by repeating steps 1-3, but on step 4, do not click the **Add** button. In the **Subform** dialog, select the **DTM** subform from the list on the left panel instead. 2. Click the **OK** button to confirm inserting the subform. 3. As a result, the **DTM** subform is added to the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179939OJQSNCUARILIRGN0-image.png) 1. Add a fixed text (3) to the first value node of the DTM subform you have just inserted. To this end, use the **Text** tool. Once **New Insert Text** is shown as a node value, click **F2**, type **3**, and then click **F2** once again. As a result, the fixed text is added to the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179940RFKDCDOHQZCWPBW0-image.png) 1. Add a rearrange to the second value node of the DTM subform, by dragging the former from the input to the latter in the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179947SBGEWJDJPRQWMHQ0-image.png) 1. Change the order of the subforms in the output. To this end, right-click the last **DTM** subform, and in the context menu that appears, first click **Move Before**, and then click **RFF**. As a result, you can see the DTM subform is now placed before the RFF subform. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179949LYPXSCGZFCFSGEX0-image.png) Repeat steps 1-11 to insert the following subforms by specifying the proposed string for them and editing the value node properties: | Global subform name | String | | --- | --- | | NAD | NAD+SE+Formpipe Software+Lautrupvang 1+Ballerup+2750' | | block | LIN+1+4711.001' IMD+F+:::Description' QTY+47:1:PCE' MOA+66:750' PRI+AAA:750' | | UNS | UNS+S' | | UNT | UNT+14+INVOIC0001' | | UNZ | UNZ+1+9908021557' | As a result, your output looks as follows: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179962EQEGFHERFSUOVOF0-image.png) Repeat steps 12-14 to insert the NAD subform once again into the output. Once you are done, repeat step 15 to add a fixed text (BY) to the first value node of the NAD subform you have just inserted, and then repeat step 16 to add rearranges to the rest of nodes of the NAD subform by dragging the former from the input to the latter in the output (for rearranges, see the picture below). Afterward, repeat step 17 to change the order of the subforms in the output and move the NAD subform before the block node as shown in the picture below: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/4179963KRQRVUCMDKYVDQT0-image.png) Continue with adding a pattern, rearranges and a script to the block subform. To this end, follow the steps listed below. 1. Drag the pattern added to the **** element in the input to the block node in the output. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/file.png) 1. Using the **Text** tool, add a script (Line + 1;) to the value element available in the **block** node, as it is shown on the picture below. 2. Add rearranges to the nodes of the **block** subform by dragging them from the input to the required elements in the output (for rearranges, see the picture below). ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/download(2).png) 1. Finish editing the value nodes of the subforms you have added by dragging the rearrange (**InvoiceID**) from the input to the value element of the **UNZ** subform in the output, as it is shown in the picture below. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/download (1)(3).png) 1. Once you are done, preview your final document by click the **Preview** button on the toolbar. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/download (2)(3).png) ## Attachments - [38.-Subforms-XML-EDI-JSON.lnconfigx](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/38.-Subforms-XML-EDI-JSON.lnconfigx)