web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5l2Q1Fg+EnMlsBg3qVICzm
Power Apps - Building Power Apps
Unanswered

MSN Weather from ComboBox Data Selection howto?

Like (0) ShareShare
ReportReport
Posted on 26 Apr 2019 10:33:27 by 37

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! 🙂

Categories:
  • Lmcginnis Profile Picture
    37 on 29 Apr 2019 at 14:49:56
    Re: MSN Weather from ComboBox Data Selection howto?

    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...

  • v-xida-msft Profile Picture
    on 29 Apr 2019 at 06:16:02
    Re: MSN Weather from ComboBox Data Selection howto?

    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:5.JPG

    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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2