I
@Chelsea_Trusdell wrote:I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new fieldshould 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 theFERRY 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!
I want to write a script that adds a text field to the roads.shp feature class called FERRY. This new fieldshould 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 theFERRY 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
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.