I need to find the longest string of ALL cells of a table. Unfortunately, the table can have varying number of fields each time. Is it doable?
Alex,
What context are you asking this question in? Are you talking about a certain API, desktop, or what?
Robert,
this is for the labeling expression in Desktop. Thanks!
Yes...but how to you intend to implement it? It also seems like a lot of work to read every record in every field in a table looking for the longest. Can you provide some context as to why this is needed?
The label expression itself can only "see" the one row of the table being used to label each feature.
Note that length is only defined for strings, for non-string fields you'd have to convert to text (using some formatting rule) before you could calculate a length. This could be done using a Python script.
Can you explain what you're trying to do? That may help us answer your question with little more intelligence.
it is going to be a "sub" function for the FindLabel function. I need it for calculating a number of empty spaces in a label, which depends on the max number of characters, etc. It's all to make multi-row labels nicely justified, regardless of varying nature of data that go into labels. Thanks.
I have something already , unfortunately, the separate parts of it work, but together they don"t
Robert, I added a few notes below.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.