Get records from Adalo issue with ID numbers
I am having a problem when getting records from Adalo. In this particular api I need the item.id to be the same number results, records, id.
current when I run the api I get all the records I need but the "id" for the records are being auto populated and I need then to be the same as they were in the adalo DB because those id's are being referenced for other things
I have tried a few different things with no luck. What should I use for the field_value= in the screenshot above?
One thing that I ran into is that the existing DB the id's start at 229 if they started at zero I could probably make it work. But I would like to find a solution to this problem because I have multiple other api calls with similar issues.
Answers
-
Hi,
The quick solution might be add another field called adalo_id and send the required id as a parameter to the endpoint creating record in Xano
-
Thanks Pawel Magdanski
I added a create variable for item.id then used that variable for the field_value. Also I changed to Add Record to Add or Edit Record that way it won't create duplicate records in the new DB.
So problem solved ID's are now the original ID's
-
Well I spoke too soon.
Worked fine for on DB but not on another I tried everything seems to be set up the same way but it is not using the original ID's it is creating new ID's starting at 1
-
Can I see how the add or edit record function looks like inside?
-
Then when I stop & debug the add or edit you can see the id is "10" when it should be 231
-
Here is the exact same function for a different DB and it works fine. I also tried another one and no issues.
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