No announcement yet.

Sort Data Table Columns Alphabetically.

  • Filter
  • Time
  • Show
Clear All
new posts

    [EDITOR] Sort Data Table Columns Alphabetically.

    I would love to be able to sort columns in a data table alphabetically. IMO, this is kind of a no-brainer, especially when working with data tables that have hundreds of items. Now I'm sure that a lot of people would tell me to just export my data tables as CSV files, but that isn't the most friendly nor convenient approach, nor could I do this in Excel. An example of what I might want to happen with sorting, is say I click on a column 'Description', it would sort all rows alphabetically based on the description column. This would make it easy to find blank descriptions, or anything really.

    An issue that was brought up by someone:
    What about Enums or Structs?
    Well, Enums could be sorted, Structs could as well, or simply disable that for Structs. It wouldn't kill anyone to add some functionality before having 100% of what everyone wants. Simply sorting Strings and numbers would be a great start.
    Last edited by Jamendxman3; 01-20-2016, 10:00 PM.
    Marketplace Assets

    Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
    Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
    Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

    I'm gonna bump this for attention. It would be extremely useful to sort a data table by row name or a column.

    exporting a simple text or number based to csv isnt very hard, and there are lots of csv editors that could probably reorganise things. But unless you're starting from a CSV, its a bit of a pain. In my case, most of my data tables are references to in-editor classes and data assets, which makes exporting waaaayy more trouble than its worth.


      Regarding "nor could I do this in Excel" - you can do this type of sorting easily in Excel:

      1. Select top row with column headers
      2. Data >> Filter or Home >> Sort & Filter >> Filter -- your column headers will now sort and filter
      3. Clean up your data using sorting and filtering features
      4. Export to CSV
      5. DataTable >> Re-import


        Personally I use JSON instead of CSV for data storage. My typical workflow when I add new data table starts from blueprint struct and data-table based on it for prototyping purposes. Then I export my data table to JSON file with the same name and path as original data table. At this moment engine starts to prompt me if I want to reload my data table whenever JSON file changes. And so I'm free to use whatever external tool I want to use, as long as I dont' forget to allow engine to reimport table from disk after external changes and don't forget to re-export to JSON if I do changes using built-it editor for whatever reason. At some moment I usually switch to C++ struct instead of blueprint one, usually alongside with moving most of the code to C++ too but important thing is - no data is lost in process as data table for me is just a copy of real data from JSON.

        While above could be doable with CSV as well, next part is main reason I prefer JSON over CSV:

        Find, export and merge tools are used to process JSON files. Typical example is finding entries matching certain condition, exporting them to separate file, editing said file in UE4 as separate data table if in-editor references are used or externally if only simple data is to be edited and then merging them back to original file. Basically it means treating JSON files as sort of database. It requires some effort to setup once and may require custom-made tools (not sure if freely available tools for JSON processing are good enough as I already had them custom from long before going to UE4) but it's well worth it in the long run.