Question

How to combine multiple calls with the same output in Smart Object Methods

  • 7 July 2020
  • 1 reply
  • 68 views

Hi,

 

We have a search function (that we can't change) that searches across certain databases for records. However, we would like to combine several of these calls into one smartobject method call that returns the results of the searches on individual databases into one list that we can use in a list view. Is this possible?

 

In other words currently we need to do three different smart object methods with three list views to show the search results from the three different databases that we are searching in. The search methods all return the same fields, so ideally what we want to have is one smartobject method that in turn calls the search function three times for each database, combines the resulting lists into one list which we can use in one list view, rather than three.


1 reply

Badge +6

Hi  @joshua_geldards 

 

You can use certainly this custom broker (no available for K2 Cloud):

https://community.k2.com/t5/K2-blackpearl/ADO-Query-Service-Broker/ba-p/62327

ADO Query Service Broker

 

I tested it and it's working find with following test:

SELECT CompanyName
FROM SmoCompany2.List
UNION ALL
SELECT CompanyName
FROM SmoCompany.List
HAVING CompanyName = 'Company1'
UNION ALL
SELECT CountryDescription
FROM SmoCountry.List
ORDER BY 1

 

Note: use Having x=y to fill the corrsponding input property.

 

Note:

I found this too but I never tested:

https://community.k2.com/t5/K2-Five/Advanced-ADO-Service-Broker/ba-p/107004

 

Best regards,

Olivier

Reply