Hi, i had API data repeat and based on condition i had insert and update records into a table, it was working before, not it does not works as expected. only inserting one row record, which is first record from the API data. How can i debug and see what’s gone wrong? i do not get any errors, when i checked the API action in browser i got all the data anyway.
So apiCurrencyRates.data.quotes is an array? But not repeating?
apiCurrencyRates.data.quotes is an object not array like below:
"quotes": {
"GBPEUR": 1.161343,
"GBPUSD": 1.345307,
"GBPJPY": 149.609527,
"GBPCHF": 1.253221,
"GBPAUD": 1.866747
}
Unzip following update in lib/core
.
app.zip (3.8 KB)
Don’t know if objects are supposed to repeat. Is this structure supported @patrick?
If you repeat an object it will loop its properties, you get $key and $value for the properties.
yes, i did used the key and value to store it in db. it was working great before update to latest wappler.
Hi Guys, even after updating to 4.1.1, problem still exist!. I’m stuck with my project
suddenly stoped working my api data insert and update to the db. same steps and actions. i don’t have any errors to show. server log also looks fine. What else i can do ? any suggestion?
Well for testing you can duplicate your action and replace the database steps with just simple setValue steps that output. So you can check if you have the right data for your databases and your condition check is ok.
please check this:
showing-api-data-failed-to-insert-db
i ll try to do like you say… but please check above video, you may help…
@George recreated the action as you mentioned, still i get problem, this time only one row inserted into db.
Any help? i have tried multiple time recreating the action and step but nothing helped, always one record inserted. i doubt the repeat action is not working correctly but no errors displayed. strange…
every time when issue like this i have to stop the project, and recreating the project which lead me to be bit of frustration. please make sure the features works well before the new releases, does anyone has same issue? please do test this API https://currencylayer.com/product, there is free option you can use. same API i use. which returns JSON Object as result which contains “quotes” object, which i tried to save inside the database table. if anyone could test this API same like me. would be a great help to reproduce the issue.
I checked your movie and one thing that caught my eyes is that you didn’t have a condition set on the query. So after the first insert it will always return a count and do the update instead of insert.
btw. I tested the repeater and the API, there are no problems there. It seems to be the steps inside the repeater that is causing the problem. You can simply test the repeater by outputting it and add an setValue step inside that you output.
Oh my god!.. what a mistake, i’m blind. great patrick it worked. Sorry guys…