If statement in filter condition

Hi.

I have a scenario that has a unique identifier for my clients called “ServiceID”. The scenario does a query to my DB and gets all client info and their associated unique identifier (ServiceID).

However, there are times where I just want to run the scenario for a single client. I can do this manually by setting a filter after my DB call to filter just where the ServiceID matches some value I type in (see below image). Works great.

Can you help me think through ways to automate this filter when needed? I am considering using a passed in parameter on the initial Webhook.

The statement would need to be something like…

If the passed in parameter (ServiceID) exists (or is not blank) then apply no filter and process all client records.
Else if the passed in parameter (ServiceID) exists, filter the DB results by that value.

Here is how the filter works manually. It asks each record if the ServiceID equals the manually input value of 1234

Can I pass in a ServiceID variable into the webhook that I can use to filter in the same way, but if no variable exists, just process the entire DB?

Hi @Matt_Lane

You can map the service ID variable instead of value in your filter shown in screenshot. That will check for each DB item but will only pass for one that will match.

Also you can filter the records in your DB by the value, In that case you will need to setup the router.

Regards,
Msquare Automation - Gold Partner of Make

Book a Free Consultation | Connect Live
Explore our YouTube Channel for valuable insights and updates!