From weather api need to find humidity

i have created a workflow in that first i m fetch the weather from an api and then the bot is consulting for the clothes consultant(i need to find the humidity and pressure but i dont know how to proceed for this and i m also getting an error at if condition at analyzing weather ) for the same process so now
Main.xaml (26.2 KB)

Thank You in advance
Regards ,

Hi @Raina_Ocean_Sanjay
Kindly Provide the Input and expected output of your query. It help us to provide the solution for you.
And your Xaml file corrupted due to key activities missing
image

Hi @Raina_Ocean_Sanjay ,

I did test your xaml file, but I did not receive any errors.

Let us know what exactly is your requirement to help you further on your case.

This is the Output CSV generated :
image

There are a total of 843 rows

Main.xaml (26.2 KB)
i m really sorry this the main Xaml file

Regards


This is the weather API

and this is my data in json format.

for this need to find humidity and pressure in the area and give it a cloth suggestions .

Regards

@Raina_Ocean_Sanjay
Kindly try this

JsonObject("main")("pressure").ToString
JsonObject("main")("humidity").ToString

Using Regex

Humidity=Convert.ToInt32((System.Text.RegularExpressions.Regex.Match(jsonString,"(?<=\Whumidity\W:)\d+").ToString))
Pressure= Convert.ToInt32((System.Text.RegularExpressions.Regex.Match(jsonString,"(?<=\Wpressure\W:)\d+").ToString))

Refer to this XAML file
Main (8).xaml (28.9 KB)

its working for me but now i m getting an error in if condition

Regards

@Raina_Ocean_Sanjay
Did you assign the value for temperature?

no but i m already getting temperature from an api then why should i assign the value to it and wht kind of value should i assign

Regards ,

@Raina_Ocean_Sanjay
Without assign, how can the value pass to variable? and how can you compare it?
UseTemperature=JsonObject("main")("temp").ToString

@Raina_Ocean_Sanjay
This error occurs due to Temperature variable has not assign any value

Temperature in number, but your given conditions is the word “shower” present in Temperature variable. Your conditions also wrong

image

1 Like

i have already done that !

as i need to give the suggestion also according to the temperature ,

Kindly Explain your requirement for If conditions.
Temperature was integer, you can compare it with integer value like Temperature>20 Temperature>40 .

@Raina_Ocean_Sanjay
Kindly Share the Xaml file. Will check and update you

Main.xaml (32.5 KB)
with this i need to suggest that with the weather what to wear with if condition .

@Raina_Ocean_Sanjay
You do not assign the Weather and temperature in your activity

Kindly refer to this and learn about the Assign activity and the basics of uipath

Refer this Flow, you may get some idea

Main (9).xaml (41.2 KB)

1 Like

okay now i get it ,
Thank You this video helped me alot :slight_smile:

Regards ,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.