on ‎2023 Feb 20 4:15 PM
Hi Team,
is it possible to perform a query with $expand subquery in Odata v2. I'm following this doc: https://help.sap.com/docs/btp/sap-business-technology-platform/expand-option
Query String: https://apisalesdemo8.successfactors.com/odata/v2/User?$select=city,hr&$filter=userId eq 'M2'&$expand=hr($select=city)
I'm getting this error

Could someone please guide me, what I am doing wrong here.
Request clarification before answering.
Try for the first $select giving a value of city,hr,hr/city
and drop the second $select (and the parentheses), because the parenthesized nested $select is only allowed for OData V4.
(Or if the backend also allows you to use OData V4, maybe switch to V4 in which case your original query should be OK)
(My answer is only with respect to OData V2 and V4; I can't comment on what the backend will support but just what is valid syntax for V2/V4).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.