Help

Re: How to return the values of a related table, not the key

Solved
Jump to Solution
313 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlos_Garcia1
4 - Data Explorer
4 - Data Explorer

how to return the values ​​of a related table, not the key, I try to do this from the javascrip api,

what i have is this:
const response = await airtablePlanes.list();

and he answers me:

[
{
“id”:“recJhPPsonGK6WQiO”,
“fields”:{
“valor_mensual”:4569,
“Name”:“PLAN_4”,
“planesToCoberturas”:[
“recGBXvrvXt6KhatT”,
“reckjMfRzp6jnHEED”,
“recCFBaAfBirzw6V3”,
“recg1TjYd6ekRHXqJ”,
“recM04lVdWj2CDIeI”
],
“descripcion”:"Plan 4 ",
“valor_anual”:54825
},
“createdTime”:“2020-04-08T22:25:48.000Z”
},
{
“id”:“recZQkZ6hI62FqvJ0”,
“fields”:{
“valor_mensual”:1286,
“Name”:“PLAN_1”,
“planesToCoberturas”:[
“reczIR8pPZBAJdSsM”,
“recH0CU0TqA9cfiFg”,
“receQ9xxWZqrtd2V9”,
“recG7E3gux8diAm2D”,
“recSsWKkZTCda0kab”
],
“descripcion”:“Plan 1”,
“valor_anual”:15431,
“registros”:[
“recovGEbYXVD3ISb3”
]
},
“createdTime”:“2020-04-08T22:24:27.000Z”
},
{
“id”:“recpDt0xL5yDPcrec”,
“fields”:{
“valor_mensual”:2380,
“Name”:“PLAN_2”,
“planesToCoberturas”:[
“rec9zIsScaSyFwTc0”,
“recRFqypir5CyMG9z”,
“recNIguFd32J9H5ma”,
“recDNT4YUmu239RoQ”,
“recYTUsK66G4pGne3”
],
“descripcion”:“Plan 2”,
“valor_anual”:28562
},
“createdTime”:“2020-04-08T22:24:27.000Z”
},
{
“id”:“recxR3bQvzTwBQWuh”,
“fields”:{
“valor_mensual”:3475,
“Name”:“PLAN_3”,
“planesToCoberturas”:[
“recc6L228XSOZhm8a”,
“recspsGloVFXRvEBc”,
“recKCFxagA1iUCEt0”,
“recGvuXaRL9XLDvQU”,
“recVSR2578CDeV4Bu”
],
“descripcion”:“Plan 3”,
“valor_anual”:41694
},
“createdTime”:“2020-04-08T22:24:27.000Z”
}
]

what I want is that in the matrix planesToCoberturas it returns the values ​​of each record of that linked table, not just the key, is this possible?

Thank you for your cooperation.

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community forums!

You cannot get the values within the linked records directly from the linked record field. Here are some alternatives:

  • You can create lookup fields in the table and then read the lookup values. The lookup fields will show up in the first table along with all the other fields.

  • You can find each individual record by id in its table to get the values

  • You can select the records from their own table, (using filterByFormula if necessary to limit the number of records returned)

See Solution in Thread

1 Reply 1
kuovonne
18 - Pluto
18 - Pluto

Welcome to the Airtable community forums!

You cannot get the values within the linked records directly from the linked record field. Here are some alternatives:

  • You can create lookup fields in the table and then read the lookup values. The lookup fields will show up in the first table along with all the other fields.

  • You can find each individual record by id in its table to get the values

  • You can select the records from their own table, (using filterByFormula if necessary to limit the number of records returned)