Home > Forum > Data sources > Datasource from REST API using current form field values

Datasource from REST API using current form field values
0

Hi all!

We would like to add a datasource from REST API.

Datasource method is POST, since we have many parameters.

We need this datasource in different workflows and parameters are dependent on values entered in current form (different fields in different workflows) and also should be fetched from database from another workflow.

As I can see there is no way to use current form field values (in JSON mode, not JSON grid) in request body of datasource consuming a REST API.

Is there a workaround for this?

Another question: Is there a way to store results from a datasource as JSON string in some form field?

I hope this is clear enough.

Many thanks in advance & best regards, Nik

MVP

Hi Nik,

if the workflows have the same process or use the same database column to store the information you can make use of the "All form fields".

This will take the value of the database column in the context of the current workflow.

At least it works in the URL. I haven't used the body.

Btw. the whole logic here only works in BPS 2022 and I won't upgrade the system until business rules return values can be returned in Raw mode. :)

Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings