How to sort dynamic text from table attribute?

737
4
Jump to solution
03-04-2019 01:42 AM
MattiasEkström
Regular Contributor

I'm adding street names to a layout by using dynamic text from table attributes. It kind of works, but I want the streets names to be sorted ascending by name. Is that possible? I tried to use a custom SQL expression where I added ORDER BY, the expression is valid but when applying that expression my text disappear. Removing the ORDER BY part brings my text back but obviously not sorted the way I want.

A work around could be to permanently reorder all the features in the table by some script, but that's not the solution I'm looking for.

1 Solution

Accepted Solutions
TomBole
Esri Regular Contributor

Hi Mattias, 

ORDER BY is not supported by Dynamic Table Attributes. 

I'm curious on why you are not using Table Frames - Add and modify table frames—Layouts | ArcGIS Desktop - to display a sorted list of street names. 

Thanks, 

Tom

View solution in original post

4 Replies
TomBole
Esri Regular Contributor

Hi Mattias, 

ORDER BY is not supported by Dynamic Table Attributes. 

I'm curious on why you are not using Table Frames - Add and modify table frames—Layouts | ArcGIS Desktop - to display a sorted list of street names. 

Thanks, 

Tom

MattiasEkström
Regular Contributor

Hi Tom,

I'm still new to ArcGIS pro, so the reason that I don't use Table Frames is that I missed it, that's definitely what I'm supposed to use in this case. Thanks! 

0 Kudos
TomBole
Esri Regular Contributor

Hi Mattias, 

That's good news.  Please let us know if you have any questions or issues with using Table Frames or anything else.

Tom

0 Kudos
Caroline-MR-Rose
New Contributor III

I have the same question, but table frames don't seem to work for me. I have dynamic text in which I am concatenating several of the feature's attributes into a paragraph. I would like those to appear in order based on a certain column. 

 

My work-around right now is to export the table to csv, order however I want using Excel, delete all rows in the table in Arc, then re-import the csv rows, which gives every row a new ObjectID. 

 

I would really prefer to have an "order by" option within the Insert Table Attribute dialog. 

0 Kudos