Model Builder Calculate Value

1292
2
Jump to solution
04-22-2021 12:16 PM
rhughes522
New Contributor III

In ArcPro 2.7.1 I have replicated an issue that is driving me crazy.  What I need is to be able to use the output string from the Calculate Value tool as an inline variable in the output name of the Excel file. 

When I run this in model builder it outputs the correct name. 

When I run as a tool in the toolbox, the value "1" is always used as the result of Calculate Value.  

Result from Model Builder window:

rhughes522_1-1619118752503.png

Result from Toolbox Model (prior to publishing):

rhughes522_2-1619118851643.png

 

What am I missing?  Is this expected behavior or a bug?

 

Thanks!!

 

0 Kudos
1 Solution

Accepted Solutions
rhughes522
New Contributor III

To resolve this issue, I've added a script tool that has in input parameter of type 'Data Element' and an output parameter of type 'File'.  When adding this script tool to the model and using it's output as the model output, the Model's output parameter changes to Derived.  That seems to fix it for desktop.  Next to test the Web Tool.

rhughes522_2-1619120683517.png

 

rhughes522_1-1619120620376.png

 

View solution in original post

0 Kudos
2 Replies
rhughes522
New Contributor III

To resolve this issue, I've added a script tool that has in input parameter of type 'Data Element' and an output parameter of type 'File'.  When adding this script tool to the model and using it's output as the model output, the Model's output parameter changes to Derived.  That seems to fix it for desktop.  Next to test the Web Tool.

rhughes522_2-1619120683517.png

 

rhughes522_1-1619120620376.png

 

0 Kudos
rhughes522
New Contributor III

Web Tool Update:

I've found that the issue with the Web Tool is that the Derived output is being changed to Required in the extracted model on the server!  

So while this works in Desktop it is failing as a Web Tool.  

Any ideas on how to use a Derived output in a Web Tool or GP Service?

0 Kudos