Hello,
is your question how you prepare the query or how you pass the values from the UI5 source to the XSJS service?
Preparing the query is straight forward, because it is a string. So if you have the values from the UI5 source you can use it for the preparation (e.g. ... "'PLACEHOLDER' = ('$$I_ORDER_TYPE$$', '" + orderTypeParameterValue + "') ...).
To have access to the value entered in the UI5 source you have to pass it as parameter to the XSJS service.
Sample XSJS service call on UI5 side. Here you see that in the "data" attribute a parameter "orderType" is passed to the XSJS service with the entered value (of course you have to replace the placeholder "<entered value>" with the real entered value.
$.ajax({ url : "<XSJS service URL>", type : "GET", data : {"orderType": <entered value> }, success : function(data){ // success handling; }, error : function(){ // error handling } });
});
Access to parameter in XSJS service can be done like following:
var orderTypeParameterValue = $.request.parameters.get("orderType");The retrieved parameter value you can use to prepare your query string. Please consider that you should do some checks if the parameter is valid (if necessary).
Best Regards,
Florian