I
Solved! Go to Solution.
@Chelsea_Trusdell wrote:I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field
should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the
FERRY field should be NO.I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before.
thanks!
What have you got so far?
Did you see the code block examples in the help? There are lots in the Community as well
Examples of using Calculate Value—ArcGIS Pro | Documentation
@Chelsea_Trusdell wrote:I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new field
should be populated with values of YES and NO depending on the value of the FEATURE field. If the value of the FEATURE field is ‘Ferry Crossing’, the value of the FERRY field should be YES – otherwise the value of the
FERRY field should be NO.I want to write the code that Uses a field calculation code block section within the geoprocessing tool. do i create a function in the code block or use da.cursor method within the code block. i don't have experience writing in code block before.
thanks!
What have you got so far?
Did you see the code block examples in the help? There are lots in the Community as well
Examples of using Calculate Value—ArcGIS Pro | Documentation
Have you looked at using contingent values for FERRY?
https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/contingent-values.htm