

We repeat the same operation with the rest of the values of the “type” field. When we press “Accept” the cells of the “Tipo” field that are selected will be filled out: It’s important to point out that the text will have to be between double marks. Then we run the “Field calculator” tool, available from the “Table/Field calculator” menu or from its corresponding button.Ī new window will be opened, where we can write the “Castillo” expression that we want to fill out the registers with. Once they are selected, we press on the header of the “Tipo” field (it’s shown in dark grey colour). We are going to start selecting the rows the “type” of which is “Castle”:
ARCMAP FIELD CALCULATION TOOL HOW TO
Now we are going to use the “Select by attribute” tool to select the different values of the “Type” field, and the field calculator to fill in the rows selected with the corresponding value in an automatic way.Īt this point, if you don’t know how to use the “Select by attribute” tool you can review the post where we explained its working. Now we only have to fill out the rest of the values.Īt this moment the table will be like this one: At this way all the registers will be filled out with this value. We would be able to keep the “Value by default” empty, but to save time when filling it out we are going to write “Otro” (without quotation marks). We would be able to do it manually, such as we saw at the “ Editing table” post, but thanks to the “Field calculator” we can do this exercise in a faster way.įollowing the steps that we learned in the “ Editing table” post, we put the table in editing mode, and we add a column, with “String” type, and keeping the characters by default (50).

Now, for example, we want to add a new column where we will add the type of location in Spanish language. One of the existing fields is “type”, that contains the types of location (city, castle, ruin, town, other). The expression can be written directly.Īfter viewing the theoretical part we are going to start our practical exercise.įirstly we are going to open the attribute table of the “Locations” layer, that will have 7 columns after the last exercises. Operation to be applied on the selected field. Double-clicking on a command it’s added to the expression. List of commands available depending on the selected “Type”. The list of “ Commands” available is updated depending on the selected type. Double-clicking on a field it’s added to the expression to apply. It shows the information about the selected “ Field” or “ Commands”. But firstly we are going to see its interface. We are going to see how it works with simple exercises, using our Game of Thrones data. This tool can be executed on every register of a table or only on the selected ones. It allows to make different type of calculations on the table fields. This is because its versatility, and it saves time when editing several registers at the same time. The “ field calculator” is one of the most used tools by users when editing the attributes of a layer.
