Highlighted
Absent Member.
Absent Member.
287 views

Using parameters on non-mandatory fields

Jump to solution

Hello,

I'm using TC 12.53.

I want to use parameters to fill out a applicationform. The're non-mandatory fields which aren't always filled by a parameters. I was expecting that when a parameter is empty the row will still exists in my parameterlist.

For example
1. A.
2. B
3.
4. A

TC updates my rows to:
1. A.
2. B
3. A


How can I fix this?
In the older version of Loadrunner all the parameters were in one row and in one file. I didn't have the problem with empty values in de parameters. In 12.53 each parameter has it's own file with multiple rows, but I can't leave a row empty.

Please help!

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Hi,

TruClient parameters Dialog was aligned to behave as VuGen parameters dialog behaves.  Empty rows are being truncated.

A possible workaround can be:

1., Instead of empty row use a predfined string that will represent an empty row. (for example: EMPTY)

2. In the script code whenever you read a value that is equal to EMPTY replace it with an empty string. 

var paramValue = TC.getParam("ParamName");

if (paramValue == "EMPTY"){

paramValue = "";

}

3. Now you can use paramValue to fill the optional fields or anything else

Regards,

Shlomi

View solution in original post

0 Likes
3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Hi,

TruClient parameters Dialog was aligned to behave as VuGen parameters dialog behaves.  Empty rows are being truncated.

A possible workaround can be:

1., Instead of empty row use a predfined string that will represent an empty row. (for example: EMPTY)

2. In the script code whenever you read a value that is equal to EMPTY replace it with an empty string. 

var paramValue = TC.getParam("ParamName");

if (paramValue == "EMPTY"){

paramValue = "";

}

3. Now you can use paramValue to fill the optional fields or anything else

Regards,

Shlomi

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

It almost worked. But you did help me to find the solution. We needed to add al else statement

 

var paramValue = TC.getParam("ParamName");
if (paramValue == "EMPTY"){
""
}else {
TC.getParam("ParamName")
}

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Great. Glad to hear 🙂

0 Likes
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.