Populating attribute table string field with values from long field using vbScript in

المشرف العام

Administrator
طاقم الإدارة


I want to calculate the field "area_type" with text depending on numbers from the "Value" field. I have tried with the following VB-script in "Field Calculator" but am getting this error message:

"The calculated value is invalid for the row with ObjectID = 1. For example, the calculated value may be too large for the field or you may be trying to add a string to a number field. This row will not be updated".

My "area_type" field type is string and "Value" is type long.

Dim area_typeSelect Case [value]Case "1" area_type = "aapent omraade"Case "11" area_type = "bebygd"Case "12" area_type = "samferdsel"Case "21" area_type = "fulldyrka jord"Case "22" area_type = "overflatedyrka jord"Case "23" area_type = "innmarksbeite"Case "30" area_type = "skog"Case "50" area_type = "aapen fastmark"Case "60" area_type = "myr"Case "70" area_type = "isbre"Case "80" area_type = "vann"Case "99" area_type = "ruralt (ikke kartlagt)"End Select

أكثر...
 
أعلى