Ask a Question

Persistant variables type

0 Kudos

Persistant variables type

TC has temporary variables types that can't be replicated as persistent variables


I need to create a Table Var as a persistent var - used for DDT loop


I can populate this temp var in real-time (which works) but it needs to recreated every time I want to use it,
I would like to create it at the beginning of my execution plan rather than having to recreate it every time

New Contributor

Hello @Lee_M ,


Something that has worked for us is to create an event handler. Here is some documentation:


We use the On Start Test event handler. In the handler, if the variable does not already exist, we add it. Then we update the value stored in it. 

if not Project.Variables.VariableExists(variableName):
  Project.Variables.AddVariable(variableName, variableDataType)
Project.Variables.VariableByName[variableName] = variableValue

Hope this is somewhat helpful and good luck,



Community Leader

@Larry_M thanks for the idea, I like this approach.


I would still like to hear SmartBear's input on this missing var type

Welcome to the TestComplete Feature Requests board!

Here you can review submitted feature requests and vote up the ones you like! If you can't find the feature you want - go ahead and suggest your own idea. Ideas with the highest rating can be implemented in the product.

Check out the Create a Feature Request guide for more information.
New Here?
Join us and watch the welcome video: