Forum Discussion

yurik's avatar
yurik
Contributor
9 years ago

Adding Temporary Variables from Scripts?

Hi ,

  Is there a way of adding temporary variables withing scripts?

 

Thanks!

    Yuri

4 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    Sure!

     

    You can declare variable inside your script (variable lifetime = your script runtime).

    Or you can create predefined ProjectSuite or Project variable using TC interface

  • NisHera's avatar
    NisHera
    Valued Contributor

    You can not add temporary variables from scripts

    only way is declare those manually and use or add values within script

    please read this

    • yurik's avatar
      yurik
      Contributor

      Hi  ,

         It would be nice to have the ability to add Temporary Variables from scripts.

       

      Thanks!

          Yuri

      • AlexKaras's avatar
        AlexKaras
        Community Hero

        Hi Yuri,

         

        No, Temporary Project Variables cannot be created from script.

        The possible workaround is to create a Temporary Variable of Table type and save it within the project. Then, during the runtime you can add the (named) rows to this table thus effectively emulating creation of the Temporary Variables. See "Variables of the Table Type" help topic for more details and a code sample.