Hello!
I am trying to create collection where a user can select which columns to include or exclude in the collection from a Gallery.
Currently I allow a user to filter a gallery and based on the filters selected I allow the user to export the data to an excel spreadsheet. The spreadsheet exports with the same default columns every time time (I have chosen to show these columns as default). This is working like a charm.
I would like to add additional functionality that would allow a user to choose the columns they would like to include or exclude in the export.
I am hoping to achieve this by allowing the user to select a column to add to the collection for export by selecting a checkbox. If true include that column in the collection, if false do not include it.
Below is the code I am currently using and that is working. Hoping to add functionality to allow a user to choose the columns they want to add to the collection instead of the default in the code below.
ClearCollect(_ExportCollection2,ShowColumns(GalleryA.AllItems,"{Name}", "Launch_x0020_Date","Prime"));
ClearCollect(_ExportCollection,RenameColumns(_ExportCollection2,"{Name}","Initiative Name", "Launch_x0020_Date","Launch Date", "Prime", "Prime"));
Set(varFormattedJSON, JSON(_ExportCollection, JSONFormat.IndentFour));
TrackerExporttoCSV.Run(varFormattedJSON)
;Refresh('Out Puts')
; UpdateContext({_Export: "true"})
; Select(ButtonMain)
I hope this makes sense!
Thank you!!!