Hi,
Trying to automate functions in my app, and on my 1st page I have a combo box connecting to a database, then I pull the tables out as needed through out the APP based on that selection.
I am now trying to link that combo box to MSN weather, in a button that will take me to a new page were I will pull out the information I want into lables... it's not working tho 😞
Here is the last thing I tried,
UpdateContext({Weather: MSNWeather.CurrentWeather(Concat(ComboBox1_1.SelectedItems, 'Location Address' )}) & Navigate('Current Weather',ScreenTransition.Fade)
If you can help, THANKS! 🙂
Sorry for the late reply,
So my original combow box contains site information, name/address/phone number/etc//etc..
So I've got that on my 1st page as a selection, and every page after uses that information to give options that are related to that choice.
And yes, I would like to use to continue to use the the combo box in this fashion for the weather.
So In order to get you suggestion work, so I can test it, I have been looking for the way to pull the information out via lables, and I have not found a way to do this with the given example above. If you get a minute could you show me how by pulling that information (and I am going to use the set function), to load the new page and the have a lable show tempature ... from there I could recreate each instance I'd like to pull out. Thanks, Lance
**edit
Also I think I just broke it trying to correct the location address to a valid field, using my stored lat. and lon. fields pulled from the data attached to my combo box..
Set( /* <-- Please use Set function to store the variable instead of UpdateContext function */
Weather,
MSNWeather.CurrentWeather(Concat(ComboBox1_1.SelectedItems, Location.'Lat.'&","&Location.'Lon.'), "Metric").responses.weather.current
);
Navigate('Current Weather', ScreenTransition.None)
I am not sure of the correct syntax, sorry...
Hi @Lmcginnis ,
Could you please share a bit more about the formula you typed within the Items property of the ComboBox?
Further, do you want to retrieve the Weather data based on the selected items within your ComboBox?
Based on the formula that you provided that you mentioned, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Collect" button to following:
ClearCollect(
WeatherCollection,
MSNWeather.CurrentWeather(Location.Latitude&","&Location.Longitude, "Metric").responses.weather.current
);
Navigate('Current Weather', ScreenTransition.None)
On your side, you should type the following formula:
Set( /* <-- Please use Set function to store the variable instead of UpdateContext function */
Weather,
MSNWeather.CurrentWeather(Concat(ComboBox1_1.SelectedItems, 'Location Address'), "Metric").responses.weather.current
);
Navigate('Current Weather', ScreenTransition.None)
Note: If you want to use the the Weather variable within your another screen ('Cureent Weather'), please consider store the value into a global variable using Set function instead of UpdateContext function.
Then within your 'Current Weather' screen, you could reference the values from the Weather variable.
In addition, there are some limits with the first argument (Location) of the MSNWeather.CurrentWeather() function, the valid inputs are City, Region, State, Country, Landmark, PostalCode, and Lat.Long.
Please check the following article for more details:
https://docs.microsoft.com/en-us/connectors/msnweather/#get-current-weather
Best regards,
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2