cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a comma separated list from a table variable

SOLVED
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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

4 REPLIES 4
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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

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

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
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.