Conversione stringa (String conversion)

There's a saying in computing ...

Garbage In,
Garbage Out.

If your incoming JSON forecast has the same value for min and max temperatures, there is nothing you can do except going to look for a better weather forecaster.

if you noticed the last value of temp_min doesn't show up...it happened after the 12th-13th line

Hello, I thought of adding, next to the icon, the description of the icon (clear sky, rain, clouds ....) (image1). Next to the procedures you created, I added my own (image2) and put it in the block (image3). I get (image4). Where did I go wrong? Thank you




Image4

It's

weather,1, description

Not

weather,1, rain, description

in the new value procedure.

The procedure is meant to be general purpose, so it makes no sense to hard code one specific answer in it.

I tried but it says "undefined". I tried to replace the textboxes with labels but still nothing. Maybe the procedure (image1) is incorrect?
Antonio, taking advantage of your kindness, I have not been able to replace the

api.openweathermap.org/data/2.5/forecast?lat={lat}&lon={lon}&appid={API key}

lat and long by taking them from the two textboxes (image2) called
Long_textbox
Latitd_textbox

my API
de13e1ddbf051e1bf40a6be1981f23d6&units=metric

thanks again for your kindness

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

1 Like

MyMeteo.aia (109.1 KB)



MyMeteo (1).aia (109.5 KB)

You forgot to add a list of components for the descriptions.

Because you only added a few of those labels, I had to bulletproof the loop index to avoid running past the end of the shortest of your half a dozen component lists.

I leave it to you to extend the component lists as needed.

1 Like

It worked ! Perfect, well done. I'm learning a lot. The only thing I can't do, as already written above, is how to transfer the value of
long_textbox ( longitude value)
And
latid_textbox (latitude value)
in the place of

lat={lat}
lon={lon}

inside

https://api.openweathermap.org/data/2.5/forecast?lat={lat}&lon={lon}&appid= 1{API key}

I practiced putting 2 fixed values but now we need to put any lat and lon

Thanks again for your availability

Use the blue button to add extra sockets to a JOIN block.
Add these parts ...

The bold parts are variables or components you have to supply, and the rest are text blocks.

1 Like

All right .... thank you very much, alone I would not have made it

Good evening Anthony
Can you edit this block?
I would like to delete all the contents of the 5 lists, but due to how I created the block, the lists are not deleted (data reset)

Thank you for your continued availability

The code you posted deletes the display cases, not the contents of the display cases.

Instead, send an empty list through the code that fills the display cases.

Also, go through the half dozen value procedures

  • icon
  • temp_min
  • temp_max
  • ...

and change all 'not found' to ' ' to clear the displays they feed when given an empty list.

I figured out that my block deletes the showcases but not the content

How to send an empty list through the code that fills the windows, I understood little .. it takes the block

sorry...i tried in different ways but i failed,how can i not only change the descriptions (clear sky,brochen clouds,few clouds) in italian

If the web API won't do it for you, use a LOOKUP IN PAIRS block against a table of

  • English phrase
  • Italian phrase

I tried this language conversion block (only for 1 case: clear sky) but it doesn't work

I don't know LOOKUP IN PAIRS ,never met

Here are draggable procedures to clear everything in the forecast section ...




I can't create this block from the procedures... is my version of app inventor 2 out of date?