cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a comma separated list from a table variable

SOLVED
Highlighted
Occasional 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.
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Getting a comma separated list from a table variable

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
================================

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Getting a comma separated list from a table variable

Why does it need to be a comma separated list?

Highlighted
Community Hero

Re: Getting a comma separated list from a table variable

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
================================

View solution in original post

Highlighted
Community Manager

Re: Getting a comma separated list from a table variable

Thanks for the suggestions, AlexKaras, Marsha_R!

 

@DSmachineWorld, do they help you resolve the issue?

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: Getting a comma separated list from a table variable

Thanks everyone! Much appreciated!

--
You might not like AI, but it doesn't care about you.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors