Esri / storymap-shortlist

The Shortlist story map application template by Esri
http://storymaps.arcgis.com/en/app-list/shortlist/
Apache License 2.0
43 stars 61 forks source link

Unable to order features due to NUMBER being a reserved word in RDBMS #80

Closed TFimpel closed 6 years ago

TFimpel commented 7 years ago

According to documentation the sort order of features can be manipulated by an attribute field named NUMBER. That doesn't work for many RDBMS's. For example, my data is stored in a Geodatabase within Oracle. I cannot create an attribute field named NUMBER. It is a reserved word in Oracle databases.

TFimpel commented 7 years ago

The hack required to make this work seems to go into /app/storymaps/tpl/core/MainView.js and change the word number to the attribute field name that you choose to store your desired sort order (e.g. NUMBER_). That change doesn't seem to break other functionality...so far.

RupertEssinger commented 6 years ago

Thanks for bringing this to our attention. We'll also see if this something we could fix in Shortlist for an upcoming release to provide an alternate field for Oracle RDBM users.

RupertEssinger commented 6 years ago

This enhancement is now released: https://github.com/Esri/storymap-shortlist/releases/tag/V2.4.3

For the As-Is workflow, if authors want to control the order in which their places are listed inside each tab via a data field, we now support an integer field called PLACENUMSL. For each place listed for a tab, this field lets you specify the order in which it will appear in that tab if you want that order to be different from the record order the places are in . We still support NUMBER field but that field name can't be added to all data types.

Note that the ability to use the PLACENUMSL field (or NUMBER field) to specify the order of the places in a tab so it is different than the record order in the table has no effect on the order of the tabs in a Shortlist if you are driving a Shortlist direct from data (i.e. the 'as-is' workflow). The tab order in a data-driven Shortlist is determined solely by the order in which the TAB_NAME values appear in the records based on their record order.

For more info please see the Readme.pdf file in the Story Map Shortlist data template download: http://links.esri.com/storymaps/shortlist_layer_template