How do I join these two data sets in ArcGIS? I'm trying to join the HeatingFuel table to USCounties by GEOID. I notice the last five digits in the GEOID field are the same, but I need a way to delete the beginning digits in the HeatingFuel table (or add them to the USCounties table).
Solved! Go to Solution.
Add a text field to your HeatingFuel table. Make it 10 wide (I guess anything more than 5). Calc that field using an arcade expression something like Right($feature.GEOID, 5). This should give you the common ID you need to create the join or relationship class.
The Right function will return the farthest right 5 characters from the field you enter into it. The downside of this is that it only works 100% if the ID you want to return is always the last 5 characters of the input string. If some of the IDs are varying in length you might need to use a combo of the Find, Left, and Right functions.
Also, I'm assuming the common IDs are text since they start with 0, and numeric data types hate that.
Add a text field to your HeatingFuel table. Make it 10 wide (I guess anything more than 5). Calc that field using an arcade expression something like Right($feature.GEOID, 5). This should give you the common ID you need to create the join or relationship class.
The Right function will return the farthest right 5 characters from the field you enter into it. The downside of this is that it only works 100% if the ID you want to return is always the last 5 characters of the input string. If some of the IDs are varying in length you might need to use a combo of the Find, Left, and Right functions.
Also, I'm assuming the common IDs are text since they start with 0, and numeric data types hate that.
That could be for a few reasons, but in this case I think it's because this is a .csv file. I would export the csv file to a table in a file geodatabase and add the field there. I guess you could also open the .csv file in Excel and add the column and perform the right function there (excel has its own Right function). Then re-add the .csv to your project. Keeping in mind that a .csv cannot be open in one program and edited in another at the same time it will be locked, which could be your problem now
Where does the HeatingFuel table reside?
Nevermind my reply! I figured out how to edit my table! Thank you so so much!