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

Dear Nikolaus,
If I understand correctly this looks similar to my issue:
https://community.webcon.com/forum/thread/5873/28

I managed to solve my issue with technical fields. But not sure if this will fit your needs.
If you review my above post, you will see some options suggested by Daniel. Maybe they will inspire you somehow.

Best.

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