Working with Child Tables: Enhancing Data Visibility

Working with Child Tables: Enhancing Data Visibility

Introduction

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 guide 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.


InfoResult: 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.


InfoResult: 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

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.




Best Practices

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

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

  3. Train Users: Explain how to switch views and use bulk edits.




Conclusion

Mastering child tables in iVendNext boosts productivity by reducing clicks and surfacing critical data. Whether you prefer editable grids or form views, tailor the setup to your team’s workflow.




    • Related Articles

    • Fetching Data from Child Tables Using Jinja Tags

      Introduction 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 ...
    • Working with Query Reports - Fetching Data Directly from the Database

      Introduction Query Reports in iVendNext allow advanced users to extract data directly from the database using SQL (Structured Query Language). Unlike Report Builder, which offers a no-code interface, Query Reports provide granular control over data ...
    • Data Grid Controls: Organizing and Managing POS Data

      Introduction Data Grid Controls are the backbone of efficient data visualization in iVendNext, transforming complex sales, inventory, and customer information into structured, interactive tables. This guide covers setup, customization, and best ...
    • Customizing and Managing Data

      Introduction One of the most powerful features of iVendNext is its ability to customize and manage data to suit your specific business needs. Whether you're analyzing sales performance, tracking inventory, or monitoring customer behavior, iVendNext ...
    • Customizing Module Visibility

      Introduction iVendNext is designed to serve businesses across various industries, including Manufacturing, Retail, and Education. To enhance usability, the system organizes functionalities into Modules, represented as cards on the dashboard. This ...