Working with Child Tables: Enhancing Data Visibility

Working with Child Tables: Enhancing Data Visibility

Overview

Child tables are a powerful feature in iVendNext that allow you to manage multi-row data within a single document—such as line items in a Sales Order or tasks in a Project. However, default settings often limit visibility, showing only a few columns or requiring clicks to view details. This article will teach you how to:
Enable/disable editable grids for streamlined data entry.
Customize columns to display critical fields at a glance.
Optimize child tables for better usability and reporting.




Understanding Child Tables

A child table is a sub-section of a document that holds related records. Examples include:


  • Sales Order Items (Product, Qty, Rate).

  • Project Tasks (Task Name, Assignee, Deadline).

  • Purchase Order Supplies (Item, Ordered Qty, Received Qty).


By default, iVendNext displays child tables in two modes:


  1. Editable Grid: Edit rows directly in a table view (limited to 4 columns).

  2. Form View: Open a pop-up form for each row (shows all fields).




Step 1: Enabling the Editable Grid

The editable grid lets users edit child table data inline, reducing clicks.


How to Enable

  1. Go to:


Setup > Customize > DocType  


  1. Select the parent DocType (e.g., Sales Order).

  2. Under Child Tables, locate the target table (e.g., Sales Order Item).

  3. Check "Editable Grid" and save.


Result: Users can edit fields directly in the table.




Step 2: Adding Columns to the Editable Grid

By default, only 4 columns appear. To show more:


  1. Customize the Child DocType:


  • Navigate to:


Setup > Customize > Customize Form  


  • Select the child table (e.g., Sales Order Item).


  1. Configure Column Visibility:


  • For each field, set:

    • "In List View": ✅ Checked.

    • "Column": Enter a number (1–10) to set display order.


  1. Save and Refresh:


  • Columns will appear in the editable grid based on their order.


Pro Tip:


  • Prioritize high-use fields (e.g., Item Code, Qty, Rate).

  • Avoid exceeding 10 columns to prevent clutter.




Step 3: Switching to Form View (When Needed)

For complex child tables (e.g., tasks with 15+ fields), disable the editable grid:


  1. Uncheck "Editable Grid" in the parent DocType.

  2. Ensure fields have "In List View" enabled for the preview.


Result: Users see a condensed preview but can click to open full details.




Step 4: Advanced Customizations

1. Conditional Field Visibility

Hide/show child table fields based on parent data:


// Example: Hide "Discount" column if customer is "Government"  

cur_frm.fields_dict["items"].grid.update_docfield_property(  

  "discount_percentage",  

  "hidden",  

  doc.customer_group === "Government"  

);  


2. Dynamic Column Widths

Adjust widths via CSS (Admin-only):


/* In Custom Script */  

.ivendnext-grid [data-fieldname="item_code"] { width: 200px !important; }  


3. Bulk Editing

Use "Bulk Update" (if enabled) to modify multiple rows simultaneously.




Common Issues & Fixes

Here’s a quick look at some common issues you might run into.


Issue

Solution

Columns not appearing

Ensure "In List View" and "Column" values are set.

Editable grid too narrow

Adjust column widths or disable compact view.

Slow performance

Limit columns to <10 and avoid heavy scripts.




Important Points To Remember

Some of the key points to remember are:


  1. Balance Speed vs. Detail: Use editable grids for simple tables, form views for complex ones.

  2. Standardize Columns: Keep key fields (e.g., Item, Qty) visible across all similar tables.




    • Related Articles

    • Fetching Data from Child Tables Using Jinja Tags

      Overview Child tables in iVendNext (e.g., Items, Taxes, or Additional Costs) store multi-row data linked to a parent document (e.g., Sales Invoice or Purchase Order). While Report Builder displays child table rows as duplicate lines, Jinja templating ...
    • Working with Query Reports - Fetching Data Directly from the Database

      Overview Query Reports in iVendNext let advanced users pull data using SQL for detailed, custom reporting. Unlike the no-code Report Builder, they offer full control over data queries—ideal for complex needs. However, cloud users can't write SQL ...
    • Customizing and Managing Data

      Overview This article will guide you through the key features and best practices for customizing and managing data in iVendNext. 1. Introduction to Data Customization and Management in iVendNext iVendNext offers a range of tools that allow you to ...
    • Information Controls: Displaying Critical Transaction Data

      ? What Is Information Control in iVendNext? It's the set of rules that manage how information flows in iVendNext — making sure data is captured correctly, stored safely, and only accessed by the right people. ? Key Components in POS Systems ✅ Data ...
    • Customizing Module Visibility

      Overview iVendNext supports industries like Manufacturing, Retail, and Education. Its features are grouped into dashboard Modules shown as cards. This guide explains how to customize which modules are visible to suit your business. Understanding ...