Nested read [Jul 10]

:raising_hand_man: matte asked

Hi i am trying to use nested fields child record to display other than the primary but i just get empty return. I am trying to use nested[Equipment][fields]=Key with api call https://nocodb.app.maranics.com/api/v1/db/data/v1/event/event. Any idea what i am doing wrong

:man_bald: dstala replied

<@848465010748817438> could you elaborate requirement with an example?

If you have a link established between table-a, table-b. And if you want to read a field belonging to table-b from table-a, you will have to add a lookup for that field in table-a.

:raising_hand_man: matte replied

okey so it is not enoguht with only a relation?

:raising_hand_man: matte replied

i was trying to use this https://docs.nocodb.com/developer-resources/rest-apis#nested-childrenhas-many. Where i thought it was possible to select what fields should be return from the child?

:person_tipping_hand: o1lab replied

http://localhost:9200/api/v1/db/data/noco/p_nok8ahxsgf6u7j/City/?nested[Country][fields]=LastUpdate,Country,CountryId

:person_tipping_hand: o1lab replied

City BelongsTo Country in above example

:raising_hand_man: matte replied

Thank now i mad it work, for some reason it dont work in swagger

Autogenerated from discord


Join NocoDB’s community

DiscordTwitterRedditDocs