Skip to content

Allow Only Single Row Selection in Query Browser (QB)

Merciglobal Cloud ERP provides a powerful Query Browser (QB) tool that helps users fetch and interact with database records in a visual manner. At times, restricting user interaction to a single row selection may be critical for modules that require only one record to proceed with further actions (e.g., fetching a customer profile, selecting a payment mode, etc.).

This guide explains how to configure Single Row Selection in the QB by modifying your PHP backend code.


Implementation Guide

To enable single row selection in your custom module or page:

1. Locate the PHP File/Script

Identify the PHP script from where the QB (Query Browser) parameters are passed to the frontend/browser.

2. Add Single Row Selection Flag

Insert the following line into your PHP code before calling the QB component:

<?php
   ...
   ...

   $qb_singleselect = true;

   ...
   ...
?>

✅ This instructs the QB renderer to switch to single selection mode, disabling multiple checkboxes or multi-row selections in the client interface.

3. Test the Integration

After updating the code, clear your browser cache and re-load the page to confirm that only one row can be selected in the QB grid.


Use Cases for Single Row Selection

  • Selecting a single customer for billing
  • Picking one item from inventory for viewing
  • Choosing a single supplier for purchase orders
  • Limiting record association in one-to-one relationships

Developer Notes

  • This setting is ideal for simplifying UX and avoiding incorrect multi-selections.
  • The $qb_singleselect flag is boolean. Set it to true to activate, and leave unset or false to allow multi-selection.
  • No frontend change is needed; the QB interface automatically respects this backend flag.

Thank you for choosing Merciglobal Cloud ERP!