Skip to main content

IMPORTANT - Product End of Life Statement - IMPORTANT

Request RE, Survey, and Calendar 1.5 Support Ending December 31, 2020
Contact Kinetic Data Support with Questions
Kinetic Community

Populating a parameter when calling a Simple Data Request

There are times that you need to create a DataRequest that has a qualification which is dependant on a value of a question on the current page. The data request is then called with javascript and rendered back on the page. This solution focuses on how to populate the value of a defined question which is part of the data requests qualification. This solution assumes you have an understanding of how to create a data request and create a partial to render the results.


/* Establish the question that is referred to in the qualification for the data request */

param1 = '<FLD>My Question;KS0050560C63F2qcchSgbhBgGQUqkC;ANSWER</FLD>';

var params = [param1];
var rqtParamString = KD.utils.Action._buildParamString(params);

var connection=new KD.utils.Callback(KD.utils.Action._addInnerHTML,KD.utils.Action._addInnerHTML,['myDiv']);
KD.utils.Action.makeAsyncRequest('runDataRequest', clientAction.actionId, connection, rqtParamString  , 'myPartial');