Appending Record to Array
Options
![Patopt](https://us.v-cdn.net/6037124/user_avatars/5034377.jpg)
Patopt
Member ✭
I'm having some trouble appending a new record to an existing array. So far the only thing I've been able to achieve is overwriting whatever array is already in place.
The basic logic I am trying to achieve here is that I have a table TEAM and I'm trying to add USERS to that table, pretty straight forward, but I haven't been able to get this thing working despite my best efforts.
Here is the API I've setup to do this, any idea what I'm doing wrong?
[image.png]
The basic logic I am trying to achieve here is that I have a table TEAM and I'm trying to add USERS to that table, pretty straight forward, but I haven't been able to get this thing working despite my best efforts.
Here is the API I've setup to do this, any idea what I'm doing wrong?
[image.png]
Comments
-
It looks like you are appending the array to itself instead of a new element to the array.
I don't see a screenshot of what it looks like when you click on the array but it should resemble something like this. https://docs.xano.com/working-with-data/functions/data-manipulation/arrays#add-to-end-of-array -
I'm trying to follow that, but still getting some odd behavior. I'm majorly stuck, but just feel like I'm likely missing something simple here...
I tried to simplify my function stack some, here is some more detail with all of the output from running this.
Step 1 - Populate the array with what already exists.
[image.png]
Step 2 - Add users_id which is a reference field to another table to the end of the array.
[image.png]
Step 3: Input the changed array back into the users_id reference column in the teams table.
[image.png]Here is me trying to populate 1,2,3 into the array.
[image.png][image.png]
[image.png][image.png][image.png][image.png]
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