Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am currently building a script tool which requires the user to select a sorting field from a list (built using a dependency on the featureclass). This Element is working fine, but I would like to remove the FID field as an option using the ToolValidator script

I already have an element of this validation working, which enables a sub field if the sorting field is chosen and builds a filter list

    def updateParameters(self):

        if self.params[1].value is not None:
          self.params[2].enabled = 1
        else:
          self.params[2].enabled = 0
          self.params[2].filter.list = ['Ascending', 'Descending']

However I can't seem to use updateParameters() to remove the FID field from the derived list of selectable fields

        return
share|improve this question
    
I think it might be useful if you were to edit your question to include more of the code you are putting together. Sometimes seeing not just the section that you are having trouble with, but also how that section fits into the overall function will make it easier for people to suggest a solution. –  Get Spatial Nov 9 '12 at 16:31
    
Thanks but the validation script really is that simple –  Alex Oulton Nov 14 '12 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.