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

learn more… | top users | synonyms

3
votes
1answer
25 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
2answers
57 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
47 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
32 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
87 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
44 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
199 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
86 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
100 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
26 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
61 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
37 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
80 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
234 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
57 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
470 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
133 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
143 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
114 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
76 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
38 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
146 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
111 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
104 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
261 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
26 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
71 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
850 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
88 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
118 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
191 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
54 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
164 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 ...
0
votes
0answers
98 views

Reference control on Editform from tableform - ArcPad VBscripting

I'm developing an application to record water chemistry data along a profile from the surface of a lake, every 0.5, 1, 1.5 or 2m, down to the bottom of the lake. On the Edit form, the user will ...
-1
votes
1answer
301 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
127 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
170 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
93 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
64 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 ...
0
votes
1answer
147 views

Multiple script hyperlinks not loading in ArcGIS

I've set up my layer to use hyperlinks based on a script. When I use the Hyperlink tool and click on a link, often times it loads just fine. The problem I have is when there are multiple points on ...
3
votes
3answers
869 views

How to Populate new field using expression containing MAX value from another field in ArcGIS attribute table using field calculator?

I've got one field X with 10 numerical attributes (float/double). I've created a new field Y (also float/double) which I need to populate with the percentage of each record/attribute (in each of the ...
1
vote
1answer
210 views

Designing ArcPad Quickforms to Collect Biological Data?

I am trying to design a Quickform in ArcPad 10.2 to enable efficient capture of biological survey information in the field on a Trimble Juno 3D. I am currently investigating using the Form Creation ...
1
vote
1answer
132 views

ArcPad VBscript restrict layer editing

I am attempting to restrict editing on certain layers based on the user log in. Dim objLyr1 Dim objLyr2 Dim objLyr3 Set objLyr1 = Map.Layers("PatchPanel") Set objLyr2 = Map.Layers("wHydrant") Set ...
1
vote
1answer
426 views

Removing time from date field labeling in VBScript

I'm not at all experienced with writing VBScript for labeling purposes. Here is my code so far: Function FindLabel ( [Date_of_Birth] ) if not isnull ( [Date_of_Birth] ) then FindLabel = ...
1
vote
1answer
97 views

VB Script can't run in Field Calculator

I wrote a simple script in VB. But it failed to run in field calculator. I can't figure out what is wrong with it. Below is a screenshot. Thanks for your help.
3
votes
2answers
116 views

Removing 0 values when labelling an integer field

I am trying to do a simple labelling exercise however I am a bit stuck on how to remove unwanted '0' values. I have three fields which I would like to display in a stacked label i.e. on three lines. ...
1
vote
1answer
57 views

mulitple line labeling arcgis

I try to label a field according to his length with VBScripting in Argis 10.0 The idea is : If myfield is more than a certain length, then please add a new line and split the field correctly. My ...
1
vote
2answers
206 views

How to query a data table embedded in ArcPad AXF file package using VBscript?

I would like to ask for some help on writing some VBscript (Supported in ArcPad) in a user form Command Button where the user activated the form with a unique feature ID(hence named COA_ID) already ...
0
votes
2answers
1k views

Date Time format in ArcGIS 10.1

I have a Date column in my feature class and I want the date to appear in "dd MMM yyyy" format as a label to a polygon. I am using Arc Map 10.1. I tried taking Jscript. var Dt = new Date(); Dt = ...
3
votes
2answers
4k views

How to convert field values from lower case to upper case in ArcGIS 10.1?

Using the Field Calculator in ArcGIS 10.1, I am able convert the first letter in a value from lower case to upper case. How do you convert the entire value to upper case, though? I can't seem to ...