Best Practices for Making Wide MRVS Easier to Read in Service Operations Workspace

kristinakra
Tera Contributor

Hi everyone,

I have a catalog item with a Multi-Row Variable Set (MRVS) containing many variables. In Service Operations Workspace (SOW), agents struggle to view all variables because the MRVS table is horizontal and requires scrolling.

I’ve tried using DOM-manipulation scripts (like document.querySelectorAll) to render it differently, but they do not work in Workspace.

I’m looking for supported, upgrade-safe ways to make wide MRVS easier to read for agents. Any best practices for handling this?

Thanks in advance for your help!

1 REPLY 1

kristinakra
Tera Contributor

Update: I've found that when the variable is not read-only there is an "Open Preview" button. How can I force it to work even when the variable is read-only. I tried with catalog client script, but it is not working:

function onLoad() {
    try {
        var mrvsName = 'mrvs_test';

        // Function to make preview buttons visible
        function showPreviewButtons() {
            var mrvsElement = g_form.getControl(mrvsName);
            if (!mrvsElement) return;

            // Find all rows in the MRVS table
            var rows = mrvsElement.querySelectorAll('tr[data-row-id]');
            rows.forEach(function(row) {
                // Find the Open Preview button in each row
                var previewBtn = row.querySelector('button[title="Open Preview"]');
                if (previewBtn) {
                    previewBtn.style.display = 'inline-block';
                }
            });
        }
        setTimeout(showPreviewButtons, 500);

        // Observe MRVS container for new rows added dynamically
        var mrvsContainer = g_form.getControl(mrvsName);
        if (mrvsContainer) {
            var observer = new MutationObserver(showPreviewButtons);
            observer.observe(mrvsContainer, { childList: true, subtree: true });
        }
    } catch (e) {
        console.error('Error forcing MRVS preview button visible:', e);
    }
}