Calculate Field Problem in Model Builder

1743
13
01-30-2018 08:38 AM
KyleBalke__GISP
Occasional Contributor III

When attempting to open the Calculate Field tool within an existing Model Builder model the expression section does not appear however I can see the expression when hovering over the tool.  The model was built with Pro 2.0 and I am first seeing this issue after upgrading to Pro 2.1.  Has anyone else experienced this issue?

Tags (2)
13 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Was it a parameter? (ie a P beside the calculate field or one of its variables) 

You may have to edit the model in 2.1 if it was fine in 2.0.

0 Kudos
KyleBalke__GISP
Occasional Contributor III

The expression did use a parameter and in-line variable substitution...I am currently editing in 2.1 and that is where I am experiencing this issue.  If I add a completely new Calculate Field tool to the model the expression section is available.  Seems to be a bug to me when moving from 2.0 to 2.1.  However I did notice that 2.0 was using PYTHON_9.3 as the expression type which is no longer an available option in 2.1 (now Python 3).

Edit:  Based on the Calculate Field help legacy Python and Python 9.3 expressions are supported.

0 Kudos
KyleBalke__GISP
Occasional Contributor III

Here are two screenshots:

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

sure enough Calculate Field in modelbuilder has been significantly changed

http://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/modelbuilder-changes-in-ar...

0 Kudos
KyleBalke__GISP
Occasional Contributor III

True...unfortunately my situation does not involve a migration from Desktop to Pro.  The model was built in Pro originally .  On the plus side I was able to expose the Code Block as a parameter in one of the tools and access the code I need.  Unfortunately the same is not true for the expression section so I am currently having to re-building each Calculate Field tool.  I appreciate your help Dan_Patterson

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Sorry, I couldn't find any mention anywhere of an issue... you might want to forward this to tech support especially since Beta 2.2 will be beginning and this could be put on the plate

0 Kudos
ShitijMehta
Esri Regular Contributor

Hi Kyle Balke,

This is a know issue. We are working to fix it. This behavior exhibits only in few cases. To get past this bug please re-add the calculate value tool. If you could share the repro steps you took that led to the tool getting in this state. For example, did you share the toolbox or model? copy pasted it? added in previous release and now it just shows like this in 2.1? Also, If you can share the original model that would help us take care of all fringe cases. Thanks!

KyleBalke__GISP
Occasional Contributor III

Hi Shitij Mehta

Apologies for the delayed response.  The original model was built in 2.0.  There are at least half a dozen instances of the Calculate Field tool being used in a single model and there is a high likely-hood that I used a copy/paste from the first instance of the tool that was added to the model.  The issue described in the original post  occurred only after upgrading to 2.1.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Not addressed in the dot updates to 2.1? 

More importantly, why would a copy/paste operation contribute or cause the error?

0 Kudos