Skip to main content

Suppress certain layers from exporting to xlsx , etc.

Comments

2 comments

  • John Nerge
    I'm pretty sure it's an all or nothing option, i.e. you can only remove the menu option from the viewer for all layers. If you have a smal number of layers you want people to be able to export though, you could write a basic workflow for that.
    0
  • Tom Neer
    John is correct. Removing formats is an all or nothing. From the sounds of it, you can just totally remove this functionality by editing the Desktop/Handheld/Tablet.json.js files in Sites\YOURPROJECT\Viewers\YOURPROJECT\VirtualDirectory\Resources\Config\Default or your equivalent path.

     

    Remove the following nodes: { "text": "@language-menu-export-results-to-csv", "description": "@language-menu-export-results-to-csv-desc", "iconUri": "Resources/Images/Icons/Toolbar/csv-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "csv", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-xlsx", "description": "@language-menu-export-results-to-xlsx-desc", "iconUri": "Resources/Images/Icons/Toolbar/xlsx-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "xlsx", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-shp", "description": "@language-menu-export-results-to-shp-desc", "iconUri": "Resources/Images/Icons/Toolbar/shapefile-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "shp", "fsc": "{{context}}" } },

     

    from: { "id": "FeatureSetCollectionResultsActions", "description": "@language-menu-grouped-results-list-actions", "defaultIconUri": "Resources/Images/Icons/check-24.png", "items": [ { "text": "@language-results-toggle-table-view", "description": "@language-results-toggle-table-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/view-switch-table-24.png", "libraryId": "Mapping.Infrastructure", "hideOnDisable": true, "batch": [ { "command": "ShowResultsTable", "commandParameter": "{{context}}", "abortBatchOnFailure": true }, { "command": "CloseDataFrame" } ] }, { "text": "@language-menu-zoom-to-all", "description": "@language-menu-zoom-to-all-desc", "iconUri": "Resources/Images/Icons/Toolbar/zoom-extent-24.png", "hideOnDisable": true, "command": "ZoomToFeatureSetCollection", "commandParameter": "{{context}}" }, { "text": "@language-menu-identify-buffered-feature-set-collection", "description": "@language-menu-identify-buffered-feature-set-collection-desc", "iconUri": "Resources/Images/Icons/Toolbar/buffer-shape-24.png", "hideOnDisable": true, "command": "IdentifyBufferedFeatureSetCollection", "commandParameter": "{{context}}" }, { "text": "@language-menu-show-charting-view", "description": "@language-menu-show-charting-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/charting-24.png", "hideOnDisable": true, "command": "ShowChartingView" }, { "text": "@language-menu-export-results-to-csv", "description": "@language-menu-export-results-to-csv-desc", "iconUri": "Resources/Images/Icons/Toolbar/csv-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "csv", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-xlsx", "description": "@language-menu-export-results-to-xlsx-desc", "iconUri": "Resources/Images/Icons/Toolbar/xlsx-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "xlsx", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-shp", "description": "@language-menu-export-results-to-shp-desc", "iconUri": "Resources/Images/Icons/Toolbar/shapefile-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "shp", "fsc": "{{context}}" } }, { "text": "@language-menu-run-report", "description": "@language-menu-run-report-desc", "iconUri": "Resources/Images/Icons/Toolbar/reports-24.png", "command": "ListReports", "commandParameter": "{{context}}", "hideOnDisable": true }, { "text": "@language-menu-browse-saved-results", "description": "@language-menu-browse-saved-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/open-24.png", "command": "ListSelections", "hideOnDisable": false }, { "text": "@language-menu-save-results", "description": "@language-menu-save-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/save-24.png", "command": "ShowSaveSelectionDialog", "commandParameter": "{{context}}", "hideOnDisable": false }, { "text": "@language-menu-combine-results", "description": "@language-menu-combine-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/refine-results-24.png", "command": "ShowSearchOptions", "commandParameter": "{{context}}", "hideOnDisable": false } ] } If you want to selectively remove this functionality, we have code on Github (https://github.com/DigitalDataServices/GeocortexMenuComponents) that will allow you to do this. 
    0

Please sign in to leave a comment.