1

I have got a drop-down list of values in my model. There are word combinations that do not exist in my table.

One of the tools in my model should select string data of a field by number of characters (Char_length). My string variable is called like "Roads type". So I need to have something like

CHAR_LENGTH (" VEHICLES ") = %Roads type%

So can I make a match of words in drop-down list and specific number only within a model without making of additional layers?

Hornbydd
44.9k5 gold badges43 silver badges84 bronze badges
asked Aug 31, 2016 at 10:58
6
  • 1
    why are you comparing the length of "vehicles" which would be 10 (as you have spaces) with road type which would obviously be some sort of code. What you show makes no sense? Commented Aug 31, 2016 at 11:29
  • It is not necessarily for each parcel in field "VEHICLES" to be a word of 10 characters. It can be from 2 to 10 digits long with no spaces. Each string is a composition of ones and zeros that complete the combination like 100101101. Certain position of digit means that certatin vehicle can go on certain road. Commented Aug 31, 2016 at 12:07
  • I'm not sure I fully understand your question, are you wanting to grab all the value lengths in a field called VEHICLES and populate those number values into a drop down? Commented Aug 31, 2016 at 12:10
  • @artwork21 No I want to have custom string values in drop-down list. For example I want to choose "Roads only for trucks" among other types from drop-down written by me. I have no such a string data in field so I want to have a match like "Road only for trucks" = 8 for example. Commented Aug 31, 2016 at 12:16
  • 1
    I would suggest two options, 1. Create a domain on the numeric VEHICLES field that has the various spelled out descriptive values, or 2. use Calculate Field tool/python or vbs to use if conditional logic to evaluate the numeric value and populate the related spelled out descriptive value to another field. Commented Aug 31, 2016 at 12:29

1 Answer 1

1

As my comment suggested, if you want a string text to represent numeric values in a field you have two options:

  1. Create a domain on the numeric VEHICLES field that has the various code numbers spelled out as the descriptive text.

  2. Use Calculate Field tool/python or vbs to use if conditional logic to evaluate the numeric value and populate the related spelled out descriptive value to new text field.

answered Aug 31, 2016 at 13:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.