Get records from Adalo issue with ID numbers

Options
macgyver
macgyver Member

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.

@Michael Udinski

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    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

  • macgyver
    macgyver Member
    Options

    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

  • macgyver
    macgyver Member
    edited August 2023
    Options

    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

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Can I see how the add or edit record function looks like inside?

  • macgyver
    macgyver Member
    Options

    Then when I stop & debug the add or edit you can see the id is "10" when it should be 231

  • macgyver
    macgyver Member
    Options

    Here is the exact same function for a different DB and it works fine. I also tried another one and no issues.