VuGen TruClient vtcAddCell variable

  • KM02752034
  • 14-Mar-2017
  • 14-Mar-2017

Summary

How to add a variable to the VTS table using TruClient protocol using the VTS.vtcAddCell function.

Question

How to add a variable to the VTS table using TruClient protocol using the VTS.vtcAddCell function

In the premade VTS function vtc.AddCell, the mandatory field value only expects a literal String.  It cannot take a variable name, and putting it quotes does not work.

To use the variable for the vtcAddCell, the correct way is to use "Evaluate Javascript" instead of the premade VTS function, and then type in the whole function call.  This way, literal Strings can be put in double quotes ("), and variable can be input as is.

Example:

Inorrrect way:  This will write the string "departing_city' into the table, instead of using the departing_city variable.

truclient_step("8", "Execute VTS.vtcAddCell ( 'CityName' , 'departing_city' , 'demo_vts' )", "snapshot=Action_8.inf");

Correct way: This will write the whatever is stored the departing_city variable into the table.

truclient_step("8", "Evaluate JavaScript code VTS.vtcAddCell('CityName', departing_city, 'demo_vts');", "snapshot=Action_8.inf");