Open Model Builder from ArcMap.
Tool 1 in Model Builder:
From the Toolbox, drag in "Select Layer by Attribute" tool. Its under "Data Management". Right click on the tool and hover over "Make Variable", then when more options pop out, select "From Parameter". When more options pop out select "Input Layer". When a new circle appears, right click on it and select "Model Parameter".
Right click again on Select Layer by Attribute tool and make another variable by parameter. This time select the "Expression" pop out. When a new circle appears, right click on it and select "Model Parameter".
Double click on the tool and under the Selection Type, insert "NEW_SELECTION". It might be a drop down, can't remember as I don't have software in front of me at the moment.
Your first tool is complete! Yippie!
Tool 2 in Model Builder:
Now you need to insert the tool that will make the new table. From the toolbox, drag in the Table to Table Tool. Its under "Conversion Tools". Connect the output of the Select Layer by Attribute tool into this tool. You do this by clicking on the "link" button on the toolbar of Model Builder. Its to the left of the play button. When you drag the output, it will ask which variable you want to connect to, so select "Input Rows" (or whatever pops out that is close to that).
As you did in tool 1, make variables from the parameters of "Output Path" and "Output Name'. Right click, Make Variable, from parameter and chose the parameter. On each new circle, right click and select "Model Parameter".
Right click on output of the Table to Table tool and select "Add to Map".
Use the tool
We are done with these tools. Click the save button and save model in a toolbox when the window pops up. Create a new toolbox in this window if you don't currently have one and put it somewhere your users can find it. Close the model.
Navigate to the model inside the Catalog window of Arcmap and double click it. What pops up should be a window with 4 input parameters, one for your main table, one for your expression, and for your output paths and new table names. For the expression it will be something similar to "YEAR = 2012 and SPECIES = 'TIGER'". That's assuming year is an integer field and species is a string field. YEAR and SPECIES are field names in your table. If YEAR is a string, then it is like this "YEAR = '2012'.
This is assuming that your table is in your ArcMap Table of Contents. The Output Path parameter has to be a Workspace, such as a file geodatabase. The table name should be a string of some type. If you want to automate the table name, that can be shown later.
Note: If the tool does not add the new table to the Table of contents, the user can simply navigate to the output path specified in the catalog window and drag it in from there.
Best Answer
You can use this command to replace all commas in the fields of your Species column with spaces:
In this post answered by Nathan, the
regex_replace
function is described by :So in your case:
EDIT:
I noticed I didn't answer the question completely as it asked how to remove commas in multiple shapefiles. Therefore, if all shapefiles are loaded into QGIS, you can use the following code to iterate through each layer and replace all commas with spaces for a specific field: