Removing an element from an array
Options
![Pedro Martínez](https://us.v-cdn.net/6037124/user_avatars/3716597.jpg)
Pedro Martínez
Member ✭
I am not being able to remove an element from an array. I have followed this video:
So I first create a Get record function:[Captura de pantalla 2022-03-21 a las 15.58.46.png]
Then I create another function with the Find All Elements:[Captura de pantalla 2022-03-21 a las 15.59.29.png]And I configure it as suggested:[Captura de pantalla 2022-03-21 a las 15.59.46.png]But when I run and debug the API it tells me that it runs successfully but it does nothing. The provided element remains in the array. I don't know if I am missing some additional step.
Thanks.
So I first create a Get record function:[Captura de pantalla 2022-03-21 a las 15.58.46.png]
Then I create another function with the Find All Elements:[Captura de pantalla 2022-03-21 a las 15.59.29.png]And I configure it as suggested:[Captura de pantalla 2022-03-21 a las 15.59.46.png]But when I run and debug the API it tells me that it runs successfully but it does nothing. The provided element remains in the array. I don't know if I am missing some additional step.
Thanks.
Comments
-
Can you show the rest of your function stack?
-
Nevermind! I realized that it was returning a new array which I named and I needed to add an additional function to edit the record with this new array. Now it is working just fine. My only issue is that I receive in the console when I execute the action in the frontend a server error 500 but the action is properly done and the array is updated. So I am not sure about that 500 error. Thanks!
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