Skip to main content
Solved

Can I seperate attributes by the number of characters in the field?


gmbutler2
Contributor
Forum|alt.badge.img+10

I have an attribute field that will have either 13 digits or 14 digits depending on the location they are at. Is there a way to differentiate these attributes using some kind of tester that looks at the location attribute and says, "If it has 14 digits it goes this way, and if it has 13 digits it goes that way!"?

Best answer by david_r

You can also use the StringLength function directly inside the tester. E.g. if your attribute is called "my_attr"

@StringLength(@Value(my_attr))

As in:

0684Q00000ArK1cQAF.png

View original
Did this help you find an answer to your question?

3 replies

mygis
Contributor
Forum|alt.badge.img+12
  • Contributor
  • June 20, 2016

Hi @gmbutler2,

The StringLengthCalculator is the transformer you need. It will give you the number of characters then you can use a Tester to separate them.

Cheers.


david_r
Evangelist
  • Best Answer
  • June 20, 2016

You can also use the StringLength function directly inside the tester. E.g. if your attribute is called "my_attr"

@StringLength(@Value(my_attr))

As in:

0684Q00000ArK1cQAF.png


gmbutler2
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 20, 2016
mygis wrote:

Hi @gmbutler2,

The StringLengthCalculator is the transformer you need. It will give you the number of characters then you can use a Tester to separate them.

Cheers.

Thank you so much! That solves my problem exactly. Have a great day! :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings