Allow Only Single Row Selection in Query Browser (QB)
Merciglobal Cloud ERP offers a robust Query Browser (QB) that enables users to visually interact with database records. In scenarios where it's essential to restrict user interactions to a single record, such as selecting a customer profile or a payment method, enabling Single Row Selection ensures data integrity and streamlines workflows.
This guide provides step-by-step instructions to configure Single Row Selection within the QB component by updating your PHP backend code.
Implementation Guide
To enforce single row selection in your custom module or interface:
1. Locate the PHP File/Script
Identify the PHP script responsible for configuring and rendering the Query Browser on your page.
2. Add the Single Row Selection Flag
Before invoking the QB renderer in your PHP file, include the following directive:
$qb_singleselect = true;
✅ This flag instructs the QB to activate single selection mode, which disables the ability to select multiple rows or checkboxes in the UI.
3. Test the Integration
Once the code is updated:
- Clear your browser cache
- Reload the page
- Verify that only a single row can be selected at any time in the QB interface
Use Cases for Single Row Selection
- Selecting a single customer for invoicing or profile viewing
- Choosing one inventory item for detailed inspection
- Picking a specific supplier for placing purchase orders
- Ensuring one-to-one relationships in module associations
Developer Notes
- Enabling single row selection enhances user experience and reduces the risk of erroneous multi-record operations.
- The
$qb_singleselect
variable is boolean. Set totrue
to enable, and either unset orfalse
to disable. - No additional frontend modifications are required. The QB component automatically adapts based on this backend configuration.
Thank you for choosing Merciglobal Cloud ERP — simplifying enterprise operations through intelligent configuration!