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

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
Community Hero

Why does it need to be a comma separated list?

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

View solution in original post

Highlighted
Community Manager

Thanks for the suggestions, AlexKaras, Marsha_R!

 

@DSmachineWorld, do they help you resolve the issue?

 

 

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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

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
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

Participate!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors