Obtain Index Layer in Python

Discussion created by palomarziano on May 30, 2011
Latest reply on Jun 10, 2011 by palomarziano
I'm trying to write my custum script to automatize my map series...
I've got a field for the "variable" part of the name and I would like to obtain it by the index layer in a filter field. If I insert the layer in a parameter all works fine, but I would like to obtain the index layer automatically...
is it possibile?

index_layer = self.params[15].value
self.params[4].filter.list = [str( for field in arcpy.ListFields(index_layer)]

At the moment I'm using a parameter (params[15]) where I put the field name but I would like to automate it...