can you map multiple inputs from the UI into one request parameter (using JS to format them)... ex: value1 + value2? I know on a response parameter, you can map multiple using a javascript variable, but what about on the request side?
can you map multiple inputs from the UI into one request parameter (using JS to format them)... ex: value1 + value2? I know on a response parameter, you can map multiple using a javascript variable, but what about on the request side?
Hi Marcel,
Yes, you can.
Let's assume, we have to input components ("input_firstName" and "input_lastName") on the page that we should to send in "full_name" request parameter.
To do this please follow this steps below:
ol
liOpen your goal datasource./li
liOpen "Request" tab. There are all request parameters. Find your "full_name" parameter. And click "Add JS"/"Edit JS". http://prntscr.com/3cuv92/direct/li
liJS editor appears. Insert the following code:
precode
//Getging first name. "input_firstName" is name of the input component.
var firstName = Appery("input_firstName").val();
var lastName = Appery("input_lastName").val();
var fullName = firstName + "_" + lastName;
return fullName;/code/pre
/li
/ol
That's all.
Regards.
Perfect. You guys rock! Thanks.