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?

  • 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? – Hornbydd Aug 31 '16 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. – Pavel Pereverzev Aug 31 '16 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? – artwork21 Aug 31 '16 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. – Pavel Pereverzev Aug 31 '16 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. – artwork21 Aug 31 '16 at 12:29
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.