<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python - Select Multiple Checkbox Choices to Calculate a Field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141852#M11031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Dan, for clarifying!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are curious what the final script is, my corrections to the snippet are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;# Calculate variable text fields&lt;BR /&gt;rows = arcpy.UpdateCursor(SHAPEFILE)&lt;BR /&gt;for row in rows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.PRJNAME = Project_Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.CLIENT = Project_Client&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.AREA = Project_Area&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;# This is the correct thing to do to get the script&amp;nbsp;to work properly with the ToolValidation code.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;row.DATATYPE = str(Data_Type_or_Types)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 19:33:22 GMT</pubDate>
    <dc:creator>SarahWillett</dc:creator>
    <dc:date>2016-11-02T19:33:22Z</dc:date>
    <item>
      <title>Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141847#M11026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I want to allow the user who runs the script to select however many choices from a list to populate a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The choices are all string values I created in the script tool parameters using the &lt;STRONG&gt;Value List Filter&lt;/STRONG&gt; for the &lt;STRONG&gt;Expression&lt;/STRONG&gt; parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; After using Add Field function, I need to populate/calculate the "Choices" attribute column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *The Choices field is not present before running the script. This is just to help visualize what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG alt="screen_capture_4_shapefile_attribute_window.png" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/207881_screen_capture_4_shapefile_attribute_window.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The script window.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen_capture_1_script_window.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/207875_screen_capture_1_script_window.png" style="width: 620px; height: 403px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the code for this script.&lt;/P&gt;&lt;P&gt;*This was extracted from Model Builder.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen_capture_2_script_code.png" class="image-7 jive-image" height="400" src="https://community.esri.com/legacyfs/online/207890_screen_capture_2_script_code.png" style="height: 434px; width: 822.875px;" width="758" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is the validation code for the script (which is the standard for a new script).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG alt="screen_capture_3_script_validation.png" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/207877_screen_capture_3_script_validation.png" style="width: 620px; height: 420px;" /&gt;&lt;/P&gt;&lt;P&gt;The following shows the parameters for the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG alt="screen_capture_6_script_parameters.png" class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/207883_screen_capture_6_script_parameters.png" style="width: 620px; height: 588px;" /&gt;&lt;/P&gt;&lt;P&gt;The following is the error message I get when running the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG alt="screen_capture_5_error_message.png" class="image-5 jive-image" height="458" src="https://community.esri.com/legacyfs/online/207882_screen_capture_5_error_message.png" style="height: 458px; width: 718.886px;" width="719" /&gt;&lt;/P&gt;&lt;P&gt;I am new to Python and could use some guidance. &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sarah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:29:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141847#M11026</guid>
      <dc:creator>SarahWillett</dc:creator>
      <dc:date>2016-06-15T20:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141848#M11027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would confirm the field syntax since vb requires [ ] around the field name and python the ! ! marks.&amp;nbsp; And while you are at it, I would switch to python to give your development some future life. &lt;/P&gt;&lt;P&gt;As a test, do a manual &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/calculate-field.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/calculate-field.htm"&gt;Calculate Field—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;then check the Results window to get the correct format just to make sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:43:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141848#M11027</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-15T20:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141849#M11028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also add the choices as Boolean parameters, then in you script check which choices are "true" and construct a string from the values to use in your CalculateField expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 07:11:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141849#M11028</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-17T07:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141850#M11029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since posting this, I have revised my code but the script is still not working completely.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The field i'm trying to populate from the checkbox choices won't populate even though the script says it ran correctly.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image of the interface window when using the script." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/256439_Checkbox_interface_image.jpg" style="width: 620px; height: 411px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've provided both my &lt;STRONG&gt;Script&lt;/STRONG&gt; and the &lt;STRONG&gt;Validation&lt;/STRONG&gt; code I'm using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy modules&lt;BR /&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Variables&lt;BR /&gt;SHAPEFILE = arcpy.GetParameterAsText(0)&lt;/P&gt;&lt;P&gt;Project_Number = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;Project_Name = arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;Project_Type = arcpy.GetParameterAsText(3)&lt;/P&gt;&lt;P&gt;Survey_Type = arcpy.GetParameterAsText(4)&lt;/P&gt;&lt;P&gt;Data_Type_or_Types = arcpy.GetParameterAsText(5)&lt;/P&gt;&lt;P&gt;Current_Year = arcpy.GetParameterAsText(6)&lt;/P&gt;&lt;P&gt;Project_Client = arcpy.GetParameterAsText(7)&lt;/P&gt;&lt;P&gt;Project_Area = arcpy.GetParameterAsText(8)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Add fields&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "PRJNUM", "TEXT", "", "", "20", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "PRJNAME", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "PRJTYPE", "TEXT", "", "", "50", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "SURVEYTYPE", "TEXT", "", "", "50", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "DATATYPE", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "YEAR", "TEXT", "", "", "10", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "CLIENT", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "AREA", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")&lt;BR /&gt;arcpy.AddField_management(SHAPEFILE, "COMMENTS", "TEXT", "", "", "254", "", "NULLABLE", "NON_REQUIRED", "")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Calculate LONG (number) fields&lt;BR /&gt;arcpy.CalculateField_management(SHAPEFILE, "PRJNUM", Project_Number, "VB", "")&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(SHAPEFILE, "YEAR", Current_Year, "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Calculate variable text fields&lt;BR /&gt;rows = arcpy.UpdateCursor(SHAPEFILE)&lt;BR /&gt;for row in rows:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;row.PRJNAME = Project_Name&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.CLIENT = Project_Client&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.AREA = Project_Area&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;# This is the snippet of code I think is incorrect.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;for input_data in Data_Type_or_Types:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if input_data == 'true':&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.DATATYPE = str(Data_Type_or_Types)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Calculate dropdown menu choice fields&lt;BR /&gt;arcpy.CalculateField_management(SHAPEFILE, "PRJTYPE", Project_Type, "VB", "")&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(SHAPEFILE, "SURVEYTYPE", Survey_Type, "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Calculate COMMENTS with default text&lt;BR /&gt;arcpy.CalculateField_management(SHAPEFILE, "COMMENTS", "\"N/A\"", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;del row, rows, Current_Year, Data_Type_or_Types, Project_Area, Project_Client, Project_Name, Project_Number, Project_Type, SHAPEFILE, Survey_Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My ToolValidation Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;class ToolValidator(object):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;"""Class for validating a tool's parameter values and controlling the behavior of the tool's dialog."""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;def __init__(self):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"""Setup arcpy and the list of tool parameters."""&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.params = arcpy.GetParameterInfo()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;def initializeParameters(self):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"""Refine the properties of a tool's parameters. This method is called when the tool is opened."""&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.params[5].filter.list = ["Gravity", "Gravity Gradiometry", "Magnetics", "Bathymetry", "Elevation", "Seismic", "Satellite &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Gravity", "Satellite Magnetics", "Satellite Bathymetry", "Satellite Topography", "N/A"]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.params[5].value = "Gravity"&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;def updateParameters(self):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"""Modify the values and properties of parameters before internal validation is performed. This method is called &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;whenever a parameter has been changed."""&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if self.params[5].value == "Gravity" or self.params[5].value == "Gravity Gradiometry" or self.params[5].value == &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Magnetics" or self.params[5].value == "Bathymetry" or self.params[5].value == "Elevation" or self.params[5].value == &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Seismic" or self.params[5].value == "Satellite Gravity" or self.params[5].value == "Satellite Magnetics" or &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.params[5].value == "Satellite Bathymetry" or self.params[5].value == "Satellite Topography" or self.params[5].value &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;== "N/A":&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self.params[5].value = True&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;def updateMessages(self):&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"""Modify the messages created by internal validation for each tool parameter. This method is called after internal &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;validation."""&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141850#M11029</guid>
      <dc:creator>SarahWillett</dc:creator>
      <dc:date>2016-11-02T18:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141851#M11030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;normally one doesn't perform a truth test against a string... 'true' &amp;nbsp;is the variable supposed to be a boolean... that is ... True &amp;nbsp;(or False). &amp;nbsp;If that is the case, then&lt;/P&gt;&lt;P&gt;if input_data == 'true': &amp;nbsp;should be&lt;/P&gt;&lt;P&gt;if input_data == True: &amp;nbsp; or just&lt;/P&gt;&lt;P&gt;if input_data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because a truth test need not have an equality check as well if it is True, then &amp;nbsp;if it is equal to True is redundant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:50:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141851#M11030</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-11-02T18:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python - Select Multiple Checkbox Choices to Calculate a Field</title>
      <link>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141852#M11031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Dan, for clarifying!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are curious what the final script is, my corrections to the snippet are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;# Calculate variable text fields&lt;BR /&gt;rows = arcpy.UpdateCursor(SHAPEFILE)&lt;BR /&gt;for row in rows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.PRJNAME = Project_Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.CLIENT = Project_Client&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;row.AREA = Project_Area&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; text-decoration: underline;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;# This is the correct thing to do to get the script&amp;nbsp;to work properly with the ToolValidation code.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;row.DATATYPE = str(Data_Type_or_Types)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;rows.updateRow(row)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-select-multiple-checkbox-choices-to/m-p/141852#M11031</guid>
      <dc:creator>SarahWillett</dc:creator>
      <dc:date>2016-11-02T19:33:22Z</dc:date>
    </item>
  </channel>
</rss>

