Trying to update an array
Options
Leo Med
Member ✭
What I'm trying to do is update the referrals object in the user_1 record when a new user sign up with his referral link. So I increment the count variable and normally push the new user name to the referrals.list existing array. count is well updated, but for list I tried all the ways I can(push, merge, ...) and it didn't work. I finally created an array variable(to test) and assigned it to list but that didn't work either.
Please help solve this, thanks.
[Image][Image]Run & Debug
[Image]
Please help solve this, thanks.
[Image][Image]Run & Debug
[Image]
Comments
-
It looks like your "referrals.list" subfield might be a list that can hold 0 elements - so it takes the first 0 elements from referrals, which is perhaps not that interesting. Can you check that type on your database?
If you don't crack it, you could bring to office hours, which the Xano folks hold gratis at 9p ET (1a GMT) this evening.
Finally, I do 1-1 mentoring - glad to look at it on a live (though not gratis) session as well. -
Hey . Yes, I set the list minimum items count to 0.
-
Finally got this done by updating the referrals field with a whole JSON instead of going through each attribute.
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