Select to view content in your preferred language

Sort Table Attribute Dynamic Text based on Symbology order

2464
15
08-09-2021 02:52 PM
Status: Implemented
Labels (1)
HansRasmussen
Occasional Contributor

Table Attribute Dynamic text sorted as per the Symbology Order and legend, specifically I'd like to be able to show the area of a polygon besides its legend patch dynamically.  Currently the attributes look to be sorted by objectid.

Tags (3)
15 Comments
CRose
by

@AubriKinghorn is there a limit on what type of field can be used to Sort? My dialog is not offering any field names in that dropdown. 

 

Also, it's worth noting that when using an SDE, the order seems to be based on GlobalID, and that is constantly changing as data gets updated... so the order of items in my dynamic text is now changing all the time. 

 

Edit to add image: 

CRose_0-1733261723567.png

 

AubriKinghorn

@CRose that's interesting. It can sort by text or numeric fields. Blobs don't work, and I don't think date fields are supported (but I may be misremembering). What other field types are in your table? How many fields are you expecting to see?

CRose
by

I had created a "Short" (integer) type field called "LegendOrder" to use for this purpose, but it doesn't appear in the sort dropdown. None of my twelve text fields appear in the Sort dropdown either. 

CRose_0-1733262808773.png

 

AubriKinghorn

Ah, I see what's happening. Your field is an expression. When you are returning an expression instead of a field the values might not match the values in the table. The potential for mismatch means a field can't be used. You can sort by the expression, but that's all. 

CRose
by

Ah, ok. 

I expected the Sort option to be independent of the "Field" that is displayed. 

My field expression in this case is just a concatenation of my "delimiterBefore" (usually but not always a new line) and my "legendText" attributes. I this case I may be able to restructure my table rows to use the delimiter in this dialogue instead. 

 

I do think it's pretty confusing for the default sort order to be based on the GlobalID, which changes every time a row is edited.