Skip to main content

Hi,

I'm looking for a way to perform server side filtering using the picker control in K2. Is there any way to map the picker control search value as a parameter when the smart object is resolving?

 

For example when a users performs a search using the control it would call the following URL:

 

https://api.example.com/users?parameter1=something&search="picker search]

Is that a REST API you are calling? In that case, why not create a REST service instance? That way you can call your API through a SmartObject, and only need to bind that SmartObject to your picker control.


 


For more information on how to utilize the REST service type, you can refer to here:


https://help.k2.com/onlinehelp/k2five/userguide/5.1/default.htm#ServiceBrokers/EndPoints/REST_Endpoint.htm


 


Thank you for your reply.

Yes I’m calling a REST API with a REST service instance. I’m able to bind it to the picker and retrieve data without any issue.

However there doesn’t seem to be any way to pass the users search value to the API.

Normally this wouldn’t be a problem because K2 handles searching in the control, but when you have large data sets it needs to download the whole list first before it can preform the search.

What I would like to do is preform the search in the API itself to reduce the amount of data sent to K2 (to decrease load times).

Reply