I am new to ModelBuilder.
I am running a python script from ModelBuilder that requires as it's parameters a table view and specific field names from that tableview. Essentially the script is looking for information from specific fields without knowing what the user may call the fields.
For example, the script needs an 'address' field and the user may have identified their address field as 'street' in their table.
I am wanting a dropdown field populated by the tableview that the user can select the correct field from and pass that field name to the script as a parameter. I have tried using the Get Field Values tool and arcpy.GetParameterAsText(1) returns the value of the field but what I need is the field name itself.
I was thinking there should be a way to create a list and populate it with something like:
fieldList = []
fields = arcpy.ListFields(tablePath)
but I have no idea how I would do this in ModelBuilder and be able to use that list to populate and parameter list the user could then use to select the correct field.