AnsweredAssumed Answered

Using the Field Mapping data type as a parameter for a script tool?

Question asked by shanetreed on Aug 21, 2019
Latest reply on Aug 22, 2019 by shanetreed



I am trying to create a script tool, and I'd like to use the Field Mappings data type for my 2nd parameter (1st parameter is a Feature Class, Table, etc.).   It seems like this type of parameter should have the Obtained from property enabled, but I cannot find a data type, for use with the 1st parameter, that enables the Obtained from property.


While trying to troubleshoot the issue, I place code in the updateParameters validation function that logs debug messages to a text file.  When I try to find the data type of the Field Mappings parameter, using the type() function with self.params[1].value or self.params[1], I get: <type 'NoneType'>.


Can someone please explain how to use the Field Mapping data type with a script tool?  Specifically, I'd like to know how to populate the control associated with the Field Mappings data type.


Thank you