Backend Workflow API - Get record and perform logic

Can I get a record from the DB based on a parameter sent in to a workflow API?

I need to look up a record, get a value, apply some logic to the data sent in and return the results.

Thanks

Hi!

Inside the API WF, you can ‘Do a search for (element)’ using necessary constraints, and if there is only one item, you could get it with :first-item ==> ‘Do a search for (element):first-item’

Sorry I should have mentioned it is a Backend Workflow,.

I don’t see an option to search for anything

can’t you send the record to the API WF as a parameter?

1 Schedule API WF
params:
-Record = ‘Do a search for (element):first-item’

2 API WF is triggered and youi can use This current record to handle its data

I have kind-of got it working using a make changes to a thing, then using it’s properties in the next step.

1 Like

Seems very tricky though to do the basics…

I want to get a thing based on a parameter sent in to the api.
Then I want to do condition …

if paramterX is greater than thingY
then
responseA = paramterX*thingZ

and return responseA

I think, you can make this work by using “Return data from API”