How to enable script tool 'Add Value' button?

278
3
01-04-2018 03:14 PM
SamyBouma_Ngock1
New Contributor II

I am building a script tool with a parameter 'Statistics Fields'.

properties as set as follow:

How do I enable the 'Add Value' button associated to this parameter?

Thanks

0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

obtained from.... and the field would be obtained from the table or featureclass table.  

Also, make sure that 'string' isn't the type of field that you currently have highlighted

0 Kudos
SamyBouma_Ngock1
New Contributor II

Thanks Dan for this.

I realize that my question was not as clear and simple as I thought.

I fact, I am trying to set my Statistics Fields parameter as a list of values where the user can add new values using the 'Add Value' Button.

When the data type is defined as String I can set the property Filter as Value List and add default values.

I don't need to set the data type as Field because the values are not obtained from fields. Moreover, the available functionality is 'Add Field'. Similar but potentially misleading for the user

How do I enable this 'Add Value' button or what is the proper way to customize this intended behavior? 

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

My read was you wanted the user to select a field to calculate statistics from... that is what I was referring to.  From there you could emulate one of tools that I have written...

Statistics... Descriptive Statistics for Multiple fields or the older

Field Statistics 

For individual statistical values, a checkbox would be simpler so they could select one or more stats parameters to calculate, then you have a simple boolean check to see what has been selected.

0 Kudos