Why do Addons return as individual arrays? Where as query all records returns a normal array?
players_in is an addon where are all_players is a query all records.
You can see by the additional [] in players_in that it is storing all the records from the addon in their own array.
Why is this and how do I fix it?
I need players_in to output the same as all_players
Answers
-
hey @jimmy - it looks like you want your Addon to be a return type of single instead of list. It looks like you are doing an Addon from a list (array) of table references. Since each item in the list represents a single player, your return type should reflect that to be single in this case. Try it out and let me know if that works!
-
Hey Micheal, thanks so much for this!! Real life saver.
Out of interest, in what situation would I use the list addon then? It seems quite a confusing ui naming it a list as I had a list of players so it seemed like the right option.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback