ArcGIS Pro,"Parameter Name and Data Type" required error in ModelBuilder Parameters

928
4
07-16-2020 09:10 AM
JCann
by
New Contributor II

I have not encountered this issue before, and after a month, I do not have a solution. This a snippet of a larger, predictive model. This is one, of two feature classes (there will probably be more added), each has a small python script to eventually allow for a drop-down list when used as a tool. There are also three raster layers (so far), with two variables each, that use scripts and do not have this issue. When I go to  Properties, Tool Properties: Model, "Parameters" is underlined in red, the numbers have been replaced by asterisks, and "Ok" is greyed out. When hovering over an asterisk I get "Parameter Name and DataType are required".

This leaves me with a model that I cannot make changes to, including creating the drop-down list that I need to create.

I have tried setting Data Type as feature class and feature layer, I have tried setting Type to Optional and Required, I have tried saving to memory\ (the preferred option) and to the gdb, and I know that it validates, runs, and adds to the map. I have tried searching for this, but have not found anything that specifically addresses this issue. Also, the final tool must consist of fill in the blank or drop-down list with no build an SQL query in the tool interface.

Tool Properties: Model, Parameters underlined in red and ok greyed out.

Snippet of model showing that it validates and runs correctly despite the parameter issues

Geoprocessing Tool Interface

0 Kudos
4 Replies
JCann
by
New Contributor II

Dropdown lists have been coded in the validation section of the script tool parameters, tools are working as a script tool and in the model builder, still have not found a fix for "Parameter Name and DataType are required". I did see the previous post on this issue, but this was not an option in my case.

0 Kudos
by Anonymous User
Not applicable

Hi John,

Quick question, is the tool that you are using (Geology Selection) an imported script or another Model Builder tool?
I have had similar issues when the using an imported script.
The parameters need to be defined correctly on the imported script in the toolbox, not just in Model Builder.
If the script has changed in the back end then that can also create issues.

Thanks,

Michael

JCann
by
New Contributor II

Michael,

It is an imported script, if I click on the script in the toolbox and run it as a tool, it works, no errors or issues. There are 4 users provided inputs; input, save location, and 3 geological types. The input and save are set as Feature Classes, the geological types are set as strings (Jtm for example). The geological types are set as text in the attribute table of the geology feature class. The parameters for the script do not show asterisks and the filter.list(s) for drop-downs are working.

It is once it is brought into the model; the feature class types are fine, but strings show an asterisk in parameters. I also have this in two other scripts, one for a feature class, one for a raster, that use double as the type for user provided input( user inputing a 1 or 4 or 50 etc. from a drop-down.) These two scripts also work when run as a tool from the toolbox but once they are in the model, the double types show asterisks in model parameters. I still need to test switching double too long to see if that changes anything.

To make it more interesting, there are three other scripts in the model, that get user entered values (fill in the box for these) for three rasters. The type is set as double and they are working as a tool from the toolbox and in the model. I may just move the entire project to a python script and set it up as a tool since the ease of use on the front end takes precedence over the ease of use on the backend. It is only in ModelBuilder because that was the initial request (and no one uses Python at my place of work).

0 Kudos
BenHawkins1
New Contributor

In case anyone else runs into this problem, it's because your variables begin with a number.  Try changing it to "First Geologic Class" and see if that fixes it.

0 Kudos