I don't see a tool to find and replace text in the attribute table of ArcGIS Pro
Update: the Find and Replace tool is available in ArcGIS Pro Version 2.5.
Thanks for implementing, this is very helpful! However, I'm not seeing a way to replace with nothing though, is that in the plan? Use case: I'm stripping out some HTML that snuck into an attribute table and I want to simply remove it by finding (<i> for example), and replace it with nothing. However, the replace arrow(s) are greyed out until I type something in the box.
Looks like the script works on a text field. I'm guessing your RDCLASS is either a Short or Long?
raze Can you verify that the script should work with integers as well as text?
Here is a screenshot of my results. I'm not smart enough to cipher through the error message. However, I recognize some similar notation to my attempts with the manual input. Thoughts? Much appreciated!
Thanks for taking the time to do that! I will pull the model down and see what happens. I made changes with quotations, spaces, commas, etc. with no success over the weekend. Hopefully, this will point out what I was missing.
I put the script in a model, see if it works. You should be able to just pick the layer and field you want to change. Text has to be in quotation marks. Reopen the table to see the change.
Over the weekend I spent a considerable amount of time trying to use the code block above. Very frustrating when it doesn't work. I don't appreciate Esri forcing users to become Python scripting gurus. There is NO reason the same SIMPLE tool found in ArcMap shouldn't have been part of first release of ArcGIS Pro. Especially if they are taking Catalog away as a separate interface to work with data.
@esri My 2 red cents worth: So is this the new norm for re-writing the core software? We, as user, have to tell you every little feature we're missing in Pro that is in Arcmap now and we use daily, just so we can get it added back? What a way to do business. Why don't you make it work like the current version we're used to using then build on that? And you wonder why we get so frustrated at change. Way to go esri... Not happy with this way of thinking at all.
This was also the case where we lost "Spatial Join" functionality being changed from Arcview 3.x, where a spatial join could be placed using the "shape" fields of 2 feature classes without creating new output, we can no longer do! Another, is the "Select Path" in the coverage days where you could select 2 line segments and it would find the shortest path between them, where did that go? So, why do we keep losing legacy good useful tools in each new release? Please explain... Or just add 'em back.
Thank you very much!
This was very useful. It works. thank you!!!
Please go to https://community.esri.com/ideas/13295 and up vote that Idea if this functionality is important to you!
Alvaro and StephenSmithAOT,
I'd encourage you to please post this as an idea in the ArcGIS Ideas space. See Submitting a New Idea if you're not familiar with the process. Ideas allow the community to vote and share the ways that they use this functionality. In this case, you and others will be able to share why the Find and Replace functionality is important to your daily workflows, and why not having it in Pro is keeping you from using Pro (which sounds like the case for you).
Thank you!
Hello,
Thank you, I think I will be going back to ArcMap. I keep trying with Pro
but they still need a bit more time. Appreciate the help.
Cheers,
Alvaro
Alvaro Campomanes
GIS Technician I
Protected Resources Division
NOAA Fisheries West Coast Region
U.S. Department of Commerce
503-231-2377
alvaro.campomanes@noaa.gov <shanna.dunn@noaa.gov>
Contractor with Ocean Associates, Inc.
www.westcoast.fisheries.noaa.gov
I don't think there is one. If you want to replace text, pick your attribute, click Calculate, type in the first box:
replace<SPAN class="punctuation token">(</SPAN>!YOURFIELDNAME!<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
and in the "Code Block" box:
<SPAN class="keyword token">import</SPAN> re <SPAN class="keyword token">def</SPAN> <SPAN class="token function">replace</SPAN><SPAN class="punctuation token">(</SPAN>val<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">return</SPAN> re<SPAN class="punctuation token">.</SPAN>sub <SPAN class="punctuation token">(</SPAN><SPAN class="string token">'OLDVALUE'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'NEWVALUE'</SPAN><SPAN class="punctuation token">,</SPAN> val<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
..or just stick with ArcMap.
I also have this question, can the find and replace tool be found anywhere when looking at attribute table records? Thank you
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.