Value added to the end of an array vanishes at completion of function stack
Options
![Jeff Strang](https://us.v-cdn.net/6037124/user_avatars/3788051.jpg)
Jeff Strang
Member ✭
Hi All,
I'm running a POST request to create a new record in a database.
Part of the function stack is to add the new record id to the end of an array of ids in another table.
The table reference field is a list array with no upper or lower record count limits.
1. The functions runs
2. The new record is created
3. The id is added to the end of the array -
4. Then for some reason the new id in the array vanishes?
See screenshots below showing the function stack and the relevant parts of the debugger.
I appreciate the help this is not a bug.
Notes:
"Discussion 2" is only included to demonstrate the error
The array targeted is "forum sections id"
[Screenshot 2022-09-27 at 9.27.35 PM.png][Screenshot 2022-09-27 at 9.29.45 PM.png][Screenshot 2022-09-27 at 9.31.09 PM.png]
I'm running a POST request to create a new record in a database.
Part of the function stack is to add the new record id to the end of an array of ids in another table.
The table reference field is a list array with no upper or lower record count limits.
1. The functions runs
2. The new record is created
3. The id is added to the end of the array -
4. Then for some reason the new id in the array vanishes?
See screenshots below showing the function stack and the relevant parts of the debugger.
I appreciate the help this is not a bug.
Notes:
"Discussion 2" is only included to demonstrate the error
The array targeted is "forum sections id"
[Screenshot 2022-09-27 at 9.27.35 PM.png][Screenshot 2022-09-27 at 9.29.45 PM.png][Screenshot 2022-09-27 at 9.31.09 PM.png]
Comments
-
Hi you're really close! Array: Add to End of Array will update the existing variable in the function stack. To update a record you would then need to use the Edit Record function so that it updates the database.
-
Thanks Michael, I was hoping it would be something simple. I had a few errors in he last week that have required rebuilds from scratch to fix. I guess this is the risk when restructuring things to simplify API calls.
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