#✅ Need help in getting more than one field value from M2A and M2M relational field when using API

3 messages · Page 1 of 1 (latest)

elder otter
#

I managed to get one related field value from a M2A
but I need more than one field value, how can I achieve it?

for example consider this query string:
*.*,related_with.item:clients.user_id.*

with this I can get user_id fields but I need all the fields of clients and user_id for example. I tried many ways but I can only get one specific field and not more than one from the related collection.

for example, from clients, I need to return something like this:
{
"client_id" : 25,
"client_birthday": "2022-01-01",
"user_id": {
"first_name" : "Jorge",
"last_name" : "Perestrelo"
....
}
.....
}

thanks in advance

unique graniteBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

unique graniteBOT
#

✅ Need help in getting more than one field value from M2A and M2M relational field when using API