Please help me with setting the icon from open weather map api. I am unable to get the code.
Please show us what you have tried so far.
This is code which I have tried till now: Thunkable
The main icon has to be set up on “detailScreen”
Firstly, you need to make a list of possible cities in the Data Viewer Grid.
I could see a mistake in your code
Put I cannot be sure if this is the issue.
Please paste the response from the API to see if an image URL exists and where in the JSON text.
I did that change but still there is some error in the code
I can’t set the value of the main weather since it is in “main” array
This is is the link to the database
Please supply a copy of the text in the response block. You are trying to retrieve icon from the
response but it might not be in the location you are trying to get it from.
I changed your code this way and I can display the image
You can see the Thunkable Beaver because I do not have access to your Airtable data.
When you get the “icon” property value, you have to join it with “.png”
Here is the link to the Airtable data
@tatiang I tried the way you were telling
But still the neither the picture is displaying nor the “Main Weather”
Please help me
Please share you Airtable base not the table. Thunkable cannot connect to individual tables in foreign base. I cannot help you if you do not share your code and components.
cityGrid screen I made these changes
detailsScreen in now this way
Check it and see
label to the
detailsScreen screen and place it anywhere you see it appreciate. It will be in place of
label6 in the code to show
Status messages received from the API.
error should the API give?
The API is a service in a remote server (computer) and could, at any time, stop responding and a good developer will always want to trap this case and deal with it, better than letting the app crash.
This is not only limited to the error but this is also true to the status. If you check your data, you’ll find that using “Bangaluru” as the city to check then you’ll find it will give an “error” in the “status” block to say city not found.
If you apply the blocks I shared as image then you should trap such condition and in the end your app will look more professional.