Skip to Main Content

How to use OR operand ADF BC Rest Api

Yunus Emre BAYRAMMay 3 2021 — edited May 3 2021

Hello everyone,
I build a sample rest api using ADF BC. It can able to CRUD operations on Departments table from HR. When I use or operand like q=DepartmentId=10 OR 20 it works fine. There is no problem.
But if I use or operand as q=DepartmentId=10 OR DepartmentName=Marketing it returns 500 and didn't bring any data. Also when it returned 500 I checked the console and error says;
Caused by: Error : 1722, Position : 258, Sql = SELECT Departments.DEPARTMENT_ID, Departments.DEPARTMENT_NAME, Departments.MANAGER_ID, Departments.LOCATION_ID FROM DEPARTMENTS Departments WHERE ( (( ( (Departments.DEPARTMENT_ID = :vc_temp_1 ) ) OR ( (Departments.DEPARTMENT_ID = :vc_temp_2 ) ) )) )
Is there anyway to do that? I can't use DepartmentId=10 or 20 because my business requirement is more complex then this.

For additional information; After console message I did some search and make some tries on oracle provided web services(inventoryOrganizations, https://docs.oracle.com/en/cloud/saas/supply-chain-management/21b/fasrp/op-fscmrestapi-resources-11.13.18.05-inventoryorganizations-get.html).
If I try to run web service like below it always respond for first query ignore the second one;
rest5.PNGAfter I enabled Rest-Framework-Version it started to work from 3 to 7(last)
rest6.PNGIs there anyway to use this Header Parameter for my Rest? I've already built seven versions and try each of them it didn't work.
My JDeveloper Version is Studio Edition Build JDEVADF_PT.12.2.1.4.0_GENERIC_190911.2248.S
My JDK Version is 1.8.0_211(Default)
Best Regards,
Yunus Emre.

This post has been answered by Timo Hahn on May 6 2021
Jump to Answer
Comments
Post Details
Added on May 3 2021
8 comments
52 views