title: Convert an array to a string in Iron Python
body: <p>I am very, very new to Iron Phyton and I am trying to create a script that will allow a user to select the 'All' function in a drop down list.  Here is the code that I have so far, but I get an error message saying that "The type 'System.String[]' of the property value does not match the expected 'System.String' type"</p>
  
  <p>I am coding in Spotfire and I can not store arrays in properties as only strings are allowed.  Ive searched that I could use  ', '.join(mylist)</p>
  
  <p>But I just do not know where to place it...Please help, thanks..Code is below</p>
  
  <pre><code>from System import Array
  from Spotfire.Dxp.Data import IndexSet
  from Spotfire.Dxp.Data import DataValueCursor
  
  #Get access to the Column from which we want to get the values from
  myCol = Document.ActiveDataTableReference.Columns["Business Group"]
  
  rowCount = Document.ActiveDataTableReference.RowCount
  rowsToInclude = IndexSet(rowCount,True)
  
  
  #Create a cursor to the Column we wish to get the values from
  cursor1 = DataValueCursor.CreateFormatted(Document.ActiveDataTableReference.Columns ["BusinessGroup"])
  
  
  strArray = Array.CreateInstance(str,rowCount)
  
  
  #Loop through all rows, retrieve value for specific column, and add value into array
   for  row in  Document.ActiveDataTableReference.GetRows(rowsToInclude,cursor1):
   rowIndex = row.Index
   value1 = cursor1.CurrentValue
   strArray[rowIndex-1] = value1   
  
  #Set property to array created above
  myCol.Properties.SetProperty("BusinessGroup",strArray)
  </code></pre>