Field Calculator - Adding HTML and changing File Paths

1217
2
Jump to solution
07-09-2014 02:43 PM
TaylorKerr
New Contributor II

Howdy,

I am using ArcMap 10.2.

In my data, I have an "Image" field that contains a file path.

I am wanting to add HTML content to both ends of this field.

The end result, a frame that displays the Image when using the HTML Popup Tool.

The tricky part is that I need to replace part of the File Path in the process.

Instead of a mapped drive, I need to replace the first part of the File Path with the name of a server which the picture resides.

Example Original "Image" path:C:\Folder\Folder\Picture.jpg

Example Changed "Image" path:\\\\\Server\Folder\Folder\Picture.jpg

Example Changed "Image" path with Frame:File

Being new to ArcGIS, perhaps I am over my head with this undertaking.

Surely there is a way to do this in bulk to all of my Features.

Any ideas?

0Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Frequent Contributor

You can find and replace in the attribute table by using control + f. This will allow you to change C:\folder to \\\\server. You can add to the end of your text by right clicking on the column header and select field calculator in the syntax add the fieldname & "text you want to add in speech marks"

View solution in original post

2回答
AnthonyGiles
Frequent Contributor

You can find and replace in the attribute table by using control + f. This will allow you to change C:\folder to \\\\server. You can add to the end of your text by right clicking on the column header and select field calculator in the syntax add the fieldname & "text you want to add in speech marks"

TaylorKerr
New Contributor II

Thank you for your reply, Anthony!

Getting creative with your Find & Replace suggestion, I was actually able to get things to work!

Turns out, the major issue I was having was that the Field Calculator wasn't using quotation marks like I wanted it to.

Find & Replace worked like a charm.

I was able to change and mold over 300 Features in only a few steps.

Thanks again for the suggestion and advice!

0Kudos