SQL Queries Pro Labels?

291
2
02-26-2020 09:47 AM
RobertBorchert
Frequent Contributor III

I can use a SQL Definition query for a feature like this

LENGTH(ALTNAME)=6

and it works.

when I try to use the same SQL query to define a class in Pro Maplex Labeling I get nothing but errors.

My goal is to label with ALTNAME fields that equal 6 characters.

Help says to use CHAR_LENGTH but it also results in errors.

Is there a way around this or can I do it with an expression using Arcade, VB etc,,

0 Kudos
2 Replies
XanderBakker
Esri Esteemed Contributor

Hi Robert Borchert ,

Have you tried using Arcade:

Left($feature.ALTNAME, 6)

(at least if you are interested in returning the first 6 characters of the field ALTNAME)

0 Kudos
RobertBorchert
Frequent Contributor III

I am using Arcade but the SQL Query only accepts SQL

However, returning the first six characters is not the issue. It is identifying those fields that have six or more characters so the label rules can be set up different.

We have a Scale Attribute for defining at what scale labels are visible at, I ended up adding 2 new definitions to the domain to accommodate the longer labels.

What I was hoping to find was a way to use arcade to show in that class only those labels that are 6 or more characters,

0 Kudos