ForeignKey is reverse LinkToAnotheRecord [Aug 30]

:raising_hand_man: azriel46d asked

Hi all, first of all greaty work with Noco!

I was wondering has the Foreign Key (https://docs.nocodb.com/setup-and-usages/column-types#foreignkey) column type been deprecated as in my local instance i’m not seeing it.

Also is it possible when querying the API for the fields parameter to have something like feature[0].name which would return the nested field?

:person_tipping_hand: o1lab replied

You can use LinkToAnotherRecord which is reverse of ForeignKey

:person_tipping_hand: o1lab replied

nested querying is possible

:person_tipping_hand: o1lab replied

see our docs

:person_tipping_hand: o1lab replied

you can click on your project API docs itself, it will be easier

:person_tipping_hand: o1lab replied

:smile:

:person_tipping_hand: o1lab replied

bottom left there is API docs and in top right menu there is swagger docs

:raising_hand_man: azriel46d replied

<@310157751395287040> I am using as described above the LinkToAnotherRecord. Due to the need of having multiple records poiniting towards I end up having to utilise the many to many approach. So over the API i get this

```

{

“Id”: 4,

“value”: true,

“feature”: [

{

“Id”: 4,

“name”: “xxx.yyy.zzz”

}

]

},

```

I have tried to utilise in filtering to be able to get it to.

```

{

“value”: true,

“feature”: “xxx.yyy.zzz”

}```

however utilising the docs and trying different strategies to try to obtain the first item in the array, does not make this happen. Is this the case? Or am i missing something ?

:raising_hand_man: James2169 replied

Why has ForeignKey field type been removed?

Autogenerated from discord


Join NocoDB’s community

Discord • Twitter • Reddit • Docs