I have a shapefile of polylines with information of diameter. But the problem is that i didn't enter the inch sign(") with the values of diameter. What would be the solution that qutation mark would place along with diameter values?
- You have to use 2 single quotes surrounded by double quotes.
- When you want to display your Inch mark on a label, use the following in the label expression.
[myinchvaluefield] & "'' "
EDIT: This works on a string field. (I guess I assumed you were attempting this on a string field to start with.)
If you have a numeric field type it will not work. As PolyGeo shows you would need to create a new field.
The easier solution (what I do) is to only show the inch mark on labels.
It might be good though to change the Alias of your field to describe the data clearer.
You can also use the Character command (under string). A double quote is ASCII code 34 (decimal), so you would enter Chr(34). Remember, you have to enter your VB code outside of quotations, otherwise it will just enter the text Chr(34) in the middle of your stuff, but yeah.
You can enter any ASCII character inside of the Chr() script, so a character return would be Chr(13) for a new line, tab would be Chr(9), etc. To look up the character codes, just google ASCII Characters.
In version 10.3 (and I assume for prior versions), it is easy to include quotation marks in Field Calculator.
As per image below, in Field Calculator, I am typing:
[PIPE_SIZE] & Chr(34) &" "& [PIPETYPE]& " "& [PIPEYEAR]
Note that Chr(34) is putting in a double quotation mark to represent FEET.
Also, note that in order to put a space between fields, I am using "double quotes" (not two single quotes).
Lastly, The PIPE_SIZE and PIPEYEAR columns are Short Integer, while PIPETYPE is Text. Of course the PIPE_INFO column is text (a must!).