VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic.

learn more… | top users | synonyms

2
votes
0answers
43 views

ArcMap Label Help - Label from X/Y Coordinate

Edited: This picture might help explain my question. Here I have a point at the line with an X/Y coordinate. It also has a leader line to it. This leader line has an X2/Y2 coordinate. Both of ...
2
votes
1answer
29 views

type mismatch: 'esri_8' when using field calculator

I am trying to run the VBScript 'round' function using the field calculator on a column for a numeric field that contains a large number of rows (> 500k). When I run the code on a subset of the field ...
0
votes
1answer
38 views

Changing Date Format via Field Calculator of ArcMap?

I'm trying to find a function in the Field Calculator (preferably in VB Script) that can add numbers into a field that already has data. I have year data ranging from the 1960s to 2014 in string ...
2
votes
1answer
21 views

ArcPad 10.2 Command bar & Quick Access Menu

I am interested in making the Quick Access menu and Command Bar not available/visible for my users. The Quick Access Menu is prompted by the little icon on the bottom right of the tab bar seen here: ...
1
vote
2answers
56 views

using field calculator on string field that has some empty values?

I have a CityState field that has the city and states of landowners. Bellingham WA, for example. I am making two new fields, OwnerCity and OwnerState in which I strip the last two characters of ...
1
vote
1answer
35 views

How do I move the last two characters of a column within the attribute table to another column?

I have data in a column that looks like the below example: El Monte CA I need to move the last 2 characters to a separate column. Which function in the field calculator will deliver those results?
0
votes
1answer
20 views

How to supress 'Start With' Menu in ArcPad 10.2?

I am fairly new to ArcPad in general and I am attempting to suppress the start with menu as seen in the attached photo. I have a script that is called in the event: onstartup, that loads the .APM I ...
1
vote
1answer
32 views

Using label expression to label highway with last group of numbers in field

I'm using Tiger road files and I want to label the highways with their shield number. Tiger has an inconsistent naming convention for road features; I am specifically concerned with the highways. I ...
1
vote
1answer
37 views

VB Script case statment syntax for the field calculator in ArcGIS 10.2?

Can anybody help me with this VB Script code for the field calculator in ArcGIS 10.2? Why in the final result are all the values 10? a= 10 Select Case UCase( [PRIORITY] ) Case "AUX 1": a = 22.5 ...
0
votes
0answers
28 views

Implementation of script for bus waiting stops

I've tried to add waiting time in bus stops in several ways (elevation fields, sub-segments, etc), but nothing worked. I'm now trying to use this script I've found in Internet: if (SourceID of ...
1
vote
1answer
43 views

extract substring after first number

Suppose I have a field titled NAME1. Examples of what is in the field appear like this: Fox Lake 1 WABASCA 166 TSU TUE 196G YELLOW QUILL I.R. 90-8 POUNDMAKER INDIAN RESERVE NO. 114-17 CROSS LAKE ...
1
vote
2answers
80 views

If-Then Label Expression

I already know that more than half of you about to read this will say, "Use Python," but I'd appreciate it if you'd humor my outdated ways. I'm trying to create a VB label expression on streets such ...
3
votes
1answer
82 views

Set scale dependant labels arcmap 10.3

I am wondering if it is possible to create scaled labels so that at a certain zoom level only one label appears but when you zoom in closer more labels appear for different fields. I have this ...
2
votes
3answers
137 views

VBScript - If/Then Statement - Field Calculator

I am trying to do a simple (or so I thought) if/then statement in the ArcGIS field calculator. I am trying to add the HydroCode field - hydologic soil codes - to an existing data set. I know what the ...
1
vote
0answers
60 views

Labelling expression - How to combine two different functions?

I'm not an expert of scripting and programming, I need to use these two functions in the labelling expression in ArcGIS. How can I combine this: Function FindLabel ( [toponimo] , [testo] ) ...
-2
votes
1answer
48 views

VB Script - If Then Statement [closed]

Code isn't working.. suggestions? Dim DevStat as string IF [LandVal1] > 0 and [BUILDVAL1] = 0 then DevStat = "Undeveloped" ElseIF [BUILDVAL1] > 0 and [LandVal1] = 0 then DevStat = ...
1
vote
4answers
168 views

How to remove period, comma, symbols using field calculator?

I want to delete . , # in attribute table using field calculator (VB Script or Python). How can I remove these using this example address: N. First St., Unit #1 (I don't need city or state name) I ...
1
vote
1answer
55 views

Concatenating fields while also replacing values within certain stings [closed]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
3
votes
2answers
242 views

VB Script or Python for Field Calculator when using greater/less than?

What I have: I have 4 fields for my address ranges. L_ADD_FROM, R_ADD_FROM, L_ADD_TO & R_ADD_TO (all in DOUBLE field type). What I need: The lesser value from L_ADD_FROM and R_ADD_FROM to ...
0
votes
1answer
110 views

if/then with VBScript in ArcGIS Field Calculator giving Error 000539: SyntaxError: invalid syntax?

What is wrong with this VBscript in the field calculator? ColumnC= if [ColumnB] > 0 then [ColumnC] = [ColumnA] / [ColumnB] endif Each time I receive this syntax error message: Error ...
0
votes
1answer
165 views

Conditional Formatting in Label Expressions

I need help with the syntax with my label expression. I have a specific set of parameters I need to display but I need to change only one attribute to label as something else. I have AC pipeline that ...
0
votes
0answers
30 views

Working with If Then Loop of Production Mapping Expression Builder and VBscript?

I'm using production mapping and I want to automate the colour of the text inside a table based on the status field. unfortunately I'm not overly familiar with VB. When I enter: "<CLR red = '255' ...
1
vote
3answers
72 views

VB Script field calculator - error with conditional statements

I have limited VB Script experience, but have been working on the script below and keep getting errors, the most common being "expected identifier". Can someone tell me what I'm missing here? Dim ...
1
vote
1answer
47 views

Field Calculator issue in ModelBuilder?

I'm trying to populate a field (AVO) using this statement AVO = dim avo if [join] = 1 then AVO = "YES" It works if I do it in ArcMap but it doesn't when I use the same syntax in ModelBuilder.
0
votes
1answer
104 views

Converting VBScript to JavaScript for labelling in ArcGIS Desktop?

I have a VB script used by ArcGIS 10.2 for Desktop to label different types of streets based on vales present in a specific field. I am a novice at Python but VB and JavaScript are beyond me. I need ...
1
vote
2answers
309 views

What's wrong with this VB Script code for the field calculator in ArcGIS 10?

I am trying to use one field's contents ([Condition]) as a condition for populating another field ([Intact]). I try to run the following code in the Field Calculator, but it never works (and is not ...
0
votes
1answer
67 views

How to populate new field according to string content of another field using VB script?

I want to populate a new field called Letting according to the string value found in another field. If 'ASP' or 'Q' is in field ExternalRE then I want 1 in Letting, everything else to be 0. Here is ...
1
vote
2answers
779 views

Removing leading zeroes (0) when labelling in ArcGIS Desktop?

I am trying to do a simple labelling exercise however bit confused how to on how to remove unwanted '0' values. I have field with road number displayed like: 0000647, 000652, 0000000236 I would like ...
1
vote
2answers
171 views

Adding button to Arcpad form

I am trying to add a button to an Arcpad form that sets the values to Cereal and Corn. This is as far as I have gotten and I am stuck. Any help would be appreciated! EDIT: I Made apl that has a form. ...
1
vote
1answer
187 views

Calculate value from an equation using Field Calculator Python/VB Script

I wanted to calculate a result value from 3 fields using an equation. VBScript or Python codes are also accepted..:-) the equation is RESULT= [(R^2/3)(S^1/2)]/n..
1
vote
1answer
157 views

how to label only number using vbscript in arcgis 10.1

I have a GPS station feature dataset and I need to label using field NAME. However, I need to label only the number, for example in the field NAME the name are GPS123, STATION 239, STN 325 but the ...
0
votes
1answer
79 views

Needed either python or VB Script to write right indent

Question : I have a field column that is has numbers with percent. The field properties are string and 50 in length. I ran it in an expression using round([T_Acres]/207 * 100,0) + "%" in VB script . ...
0
votes
0answers
51 views

Custom ArcPad toolbar button

I am trying to re-create something like the quick capture tool set already provided on arcpad, so it will allow me to capture points on the field easier. I have it currently where a form pops up and ...
2
votes
1answer
165 views

Is there an equivalent of ArcGIS Hyperlink script editor in QGIS?

I am trying to find similar functionality in QGIS to ArcGIS Hyperlink script editor. In ArcGIS I can parse VBScript from a selected field in an attribute table. The script would execute on mouse ...
0
votes
1answer
141 views

Label related records in ArcMap from enterprise geodatabase

Two questions related to labeling 1:M related records in ArcGIS 10.2. I have successfully built an Advanced Label expression in Python to label records from a related table. I am currently working ...
1
vote
3answers
123 views

If/then Field Calculator

I have two fields in my model, the first is a spatial join return for the township, the second is a spatical join to a city. If there is not city, then the field is left blank. The column that has ...
3
votes
1answer
324 views

Why is this field calculator expression evaluated incorrectly when using Python syntax?

I have a polygon featureclass containing an integer field 'gridcode'. I've added 2 new float fields VB_calc and Python_calc, both of which should be equal to gridcode / 1,000,000. If I calculate the ...
1
vote
0answers
34 views

How do I create a new layer in an ArcPad Map that's a buffer from another layer?

I'm editing code that someone else wrote for an plant species management database. Currently, you have to be holding the GPS receiver inside of the polygon for it to automatically find the previous ...
0
votes
1answer
80 views

Expression to display Image in MapTips?

In ArcMap, is it possible to display an image by using a path in the attribute table to show an image in MapTips? Any Python or vbScript expression are welcome as long as it is MapTips which shows ...
3
votes
4answers
1k views

Label using VBscript in ArcMap - multiple IF statements?

I have 4 fields that hold number values. I only want a label returned if the field <>0. For instance, if col1<>0, then label = col1 AND if col2 <>0 then label = col2, etc. So, I want all ...
3
votes
1answer
105 views

Merge String fields in ModelBuilder by undefined ArcGIS user?

I'm using ArcGIS 10. I have a doubt, because I already have a merged shapefile, with two string Fields, some Null and some filled (comes from the merge tool). So, now I want to get the values from ...
2
votes
1answer
135 views

Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: =INDEX(A2:J2;rnd()*10+1). How ...
0
votes
0answers
280 views

VBScript for Advanced Labeling in ArcGIS

I found a template I thought might be useful to create a table of sorts for a label. I modified it with my variables, but it still doesn't seem to be working. I'm not very familiar with VBScript, but ...
0
votes
1answer
63 views

Arcpad 10…using sql with VBScript

I am trying to get a count of related records (Tableform) in order to validate Editform entry (using VBS). Any help getting myCount? I Know there are some syntax issues here, but is this even ...
0
votes
2answers
214 views

ModelBuilder - How to calculate Field using part of path name

I am trying to calculate a field using part of the feature class path name (specifically, the last three characters of the geodatabase name). Is this possible? I've tried using the parse path tool and ...
-1
votes
1answer
387 views

Can someone help me to convert this Python to VBscript for labellling

I have two Python script snippets that need to convert to VBscript. Can anybody help me because I am really not familiar and know Python. the first script is def FindLabel([BA2]): name = ...
0
votes
1answer
140 views

How to calculate/record attachments' file names using Field Calculator?

I have a point feature class containing attachments corresponding to jpg files (sometime more than one jpg per feature). I would like to use the "field calculator" to calculate/record a new field that ...
0
votes
1answer
194 views

Error when calculate field using VBscript or Python (slice a field)

I have an expression in VBscript that works well for labeling: Function FindLabel (field) if (INT(RIGHT(field, 2)) <> 1) then FindLabel = INT(MID(field, 8, 3)) &"-"& ...
0
votes
1answer
101 views

Multiple field vbscript query

I'm fairly new to arc gis and I'm trying to string along several queries. individually they work in same query they don't. background I want to query all permit types rc, re, re/ap, and db; less than ...
0
votes
2answers
81 views

ArcPad 10: Accessing the Geography information of a feature through ArcPad Studio (VB Script)

I am trying to access the geography feature property of a feature being edited. I need to do it programatically (in order to auto populate a field using the geography) using VB Script. I cannot seem ...