get field valule and calculate field in modelbuilder

08-06-2021 07:00 AM
Labels (3)
New Contributor


I'm using ArcGIS Pro V 2.8.1

I'm trying to make a modelbuilder with thoses steps :

1) get a geodatabase in a folder

2) get a specific table in this geodatabase

3) get a field value from an other table (with a test condition)

5) calculate a new field with calculate field (it's a text field), and fill it with the get value function



  So, my problem is that the calculate field function doesn't fill the table with the selected value.

when I select the data type " string" in the get field value, I have this error;




but when I select the data type " field",  in the get value, I dont have errors but the new field in my table is empty.


Thanks for your help!

0 Kudos
2 Replies
Occasional Contributor III

The Get Field GP tool only returns the first row according to the ESRI documentation (Get Field Value (ModelBuilder)—ArcGIS Pro | Documentation). If you are trying to copy a field value from one table to another I believe you need a common ID field to join the tables together before you perform the field calculation.

0 Kudos
New Contributor

Hello, thank you for your answer,

Indeed, I was trying to retreive a value from an other table in order to add this value in a field, ( the same value for all features, as the calculate field does).  In fact, my goal is to realise a join with those tables and on this common ID field after this step. So thanks to your answer, gess that it is not the good method.

Maybe do you know a good way to add a value from an other table in a new field ?

Thanks a lot!

0 Kudos