Forum Discussion

DSmachineWorld's avatar
DSmachineWorld
Contributor
5 years ago

Getting a comma separated list from a table variable

So I'm trying to set up a modal user form to select a wait time in a script. This selection will be used to set the value of a project suite global variable ProjectSuite.Variables.longWait.

 

I set the combo box values up in a Table variable. The table variable isn't processed as a comma separated list, which is what I should have expected, but I wanted to try it.

def LengthToWait_OnShow(Sender):
  UserForms.LengthToWait.waitTimesComboBox.Properties.Items.CommaText = ProjectSuite.Variables.waitTimes
  UserForms.LengthToWait.ShowModal()

This code, of course, returns an error.

Is there a way to transform a Table variable into a comma separated list? The variable itself is a 1 col x 3 row right now. I don't forsee needing to add any more columns.

  • Hi,

     

    Iterate through the table and join cell values using comma as separator.