Home > Forum > Data sources > Filter REST API data source using WEBCON

Filter REST API data source using WEBCON
0

Hi, I am currently working on some tool management workflow in WEBCON and I have a problem. I have an items list with REST API as data source where user can pick and book tools for some time period. Time period property is not included in REST API so I'm using form fields for booking dates. Then I need to filter the items list using tools from REST API and dates from WEBCON database to exclude unavailable tools. Unfortunately i didn't find the way to do it using the REST API filter available in WEBCON. My plan is to create some table in WEBCON, fill it with data from API and then use SQL for filtering. Is there maybe a better way to do it?

MVP

Hi,
I had a similar case.
It ended up with the same idea you are writing about - a separate technical table for storing data from the REST API and next SELECT on this table and join the WEBCON tables with other data.
In my case, the data was updated once a day by global action

I also thought about the SDK custom data source, but the table was easier/faster ;)

Theoretically, webcon has the ability to enable filtering REST data source on the BPS side, but you can't even use business rules there, so you can't combine it with SQL query.

Maybe someone has another idea...

MVP
In reply to: Jacek Wojnar

Hi,
I had a similar case.
It ended up with the same idea you are writing about - a separate technical table for storing data from the REST API and next SELECT on this table and join the WEBCON tables with other data.
In my case, the data was updated once a day by global action

I also thought about the SDK custom data source, but the table was easier/faster ;)

Theoretically, webcon has the ability to enable filtering REST data source on the BPS side, but you can't even use business rules there, so you can't combine it with SQL query.

Maybe someone has another idea...

Hi,

you can make use of global business rules and form field values in a data source.

The attached screenshot is from a REST data source and the field is selected from "All form fields" . If the data source is executed, it takes the value of the field (table column) of the current instance. So the data source is no longer generic but specialized for this one process, but you can make use of these.

I don't know since when the "All form fields" option is available but I did not notice it before last year. :)

Best regards,
Daniel