AnsweredAssumed Answered

Ad-hoc display for symbol collections

Question asked by kbobeck on Nov 5, 2018
Latest reply on Nov 16, 2018 by jswartzentruber

When clicking on a collection, the "Ad Hoc Display" option is greyed out. I realize ad hoc trends are still possible for the individual symbols in a collection, but users often want to see multiple trends showing. Adding a table doesn't work, as you cannot remove rows or switch the symbol to a trend like you can using the ad hoc display's table.

 

Looking at %PIHOME64%PIVision\Scripts\app\editor\display\PIVisualization.display-provider.js, this is an intended function, according to the comments:

        // when no symbol is selected, return 'all' if there's no collection symbols on the display

        // Or return a list of symbol names excluding collection symbols

and

            // Adhoc will not be allowed if all selected symbols are collection symbols or,

            // in the case where no symbols are selected and all display symbols are collection symbols

 

To try and circumvent this, I removed && !isCollection(symbol.SymbolType) from the sections below

            if (instance && instance.Symbols && instance.Symbols.length) {
                adHocSymbols = (selectedSymbols && selectedSymbols.length > 0) ? selectedSymbols : instance.Symbols;
                adHocSymbols.forEach(function (symbol) {
                    if (symbolHasDatasource(symbol) && !isCollection(symbol.SymbolType) && !isGroup(symbol.SymbolType)) {
                        symbolNamesArray.push(symbol.Name);
                    }
                });

and

            if (instance && instance.Symbols && instance.Symbols.length) {
                selectedSymbols = getSelectedSymbols(asObject);
                adHocSymbols = (selectedSymbols && selectedSymbols.length > 0) ? selectedSymbols : instance.Symbols;
                return adHocSymbols.some(function (symbol) {
                    return symbolHasDatasource(symbol) && !isCollection(symbol.SymbolType);
                });

 

However, the Ad Hoc Display is still greyed out. Any suggestions on what else I need to change to make this possible?

 

Thanks,

Kelsey

Outcomes