Highlighted
Absent Member.
Absent Member.
1464 views

How do I use parameter in True Client and how do I concatenate 2 strings

Hi,

I wasn't able to understand how to use parameters in True client script.

In addition, please advise on the way to concatenate 2 strings in this protocol. it is so simple in regular javascript (when using web http protocol for example) but so unclear when using True client.

I have to say that the documentation of True client protocol is very limited.

Thanks in advance,

Gadi 

0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Re: How do I use parameter in True Client and how do I concatenate 2 strings

Hi,

Please refer to the following page

http://lrhelp.saas.hpe.com/en/latest/help/WebHelp/Content/TruClient/_tc_parameters.htm

or this page

http://tchelp.saas.hp.com/en/12.50/Content/TruClient/_tcs_r_functions.htm?Highlight=lr.getparam#TC.getParam(name)

read the API description TC.getParam and TC.setParam

 

You can add an Evaluate Javascript step, use regular javascript syntax in step arguments to concatenate two strings.

If you want to concatenate two string values get from parameter, you can write like this in the arguments of Evaluate javascript step:

var value = TC.getParam("<param name 1>") + TC.getParam("<param name 2>");

 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.