Ask a Question

Getting a comma separated list from a table variable

SOLVED
DSmachineWorld
Contributor

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.

--
You might not like AI, but it doesn't care about you.
4 REPLIES 4
Marsha_R
Community Hero

Why does it need to be a comma separated list?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
AlexKaras
Community Hero

Hi,

 

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

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
TanyaYatskovska
SmartBear Alumni (Retired)

Thanks for the suggestions, AlexKaras, Marsha_R!

 

@DSmachineWorld, do they help you resolve the issue?

 

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Thanks everyone! Much appreciated!

--
You might not like AI, but it doesn't care about you.
cancel
Showing results for 
Search instead for 
Did you mean: