How to specify a range of parameter value in a query string?

1
0
-1

Hello Bonita Community,

I was able to query data from H2 database using bdm api based on a specific parameter value. But, what I really want is to query data based on a range of a parameter value.

For example:
This is my api query now: ../API/bdm/businessData/ats.model.Customer?q=findByCustomerNumber&p=0&c=10&f=customerNumber=0001

What to do if I want to get the data based on customerNumber that has value >= 0001 and <= 0030? (customerNumber is string type attribute)

Thank you,
Virak

1 answer

1
0
-1

First of all as you are doing arithmetic operation on customerNumber I recommend to use a numeric data type instead of String.

Then the solution would be to create a custom BDM query that can received two parameters. Values of the parameters can be set in your URL just like you did for the default query findByCustomerNumber using f= URL parameter. https://documentation.bonitasoft.com/bonita/7.9/define-and-deploy-the-bdm

Notifications