cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
stefanlive
Level: Powered On

Button to put result of dropdown menu into a Label which they could add to again.

I want to have a button that updates a label. But does not just replace what is in th elabel but adds on to it.

 

So for example when you first enter the screen the label should be blank.

 

Then the user selects a value and presses the button this value is then written to the label and a , put after that value.

 

Then they choose another option from drop down list press the button and that adds it to the label...

 

So label now looks like option1, option2,

 

then it could go on and on..

 

On the next screen is a form and I then want to prepopulate a card on that form with the final results of that label.

 

I tried to use UpdateContext(newobjectives) where newobjectives is the name of the label, but cant seem to work out which value you would pass to the label.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Button to put result of dropdown menu into a Label which they could add to again.

On the on visible set a variable like updatecontext({varbuttontext:""}) or Set(varbuttontext,"")

 

Then on the onselect to the button set the variable. EG:

 

If(varbutton="",Set(varbutton,Dropdown?.Selected.Value,),Set(varbutton,varbutton &"," &Dropdown?.Selected.Value,)

 

Dropdown selected.value might be dropdown.selected.result if it is created witha distinct function

 

 

Now make label text property to equal varbutton

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Button to put result of dropdown menu into a Label which they could add to again.

On the on visible set a variable like updatecontext({varbuttontext:""}) or Set(varbuttontext,"")

 

Then on the onselect to the button set the variable. EG:

 

If(varbutton="",Set(varbutton,Dropdown?.Selected.Value,),Set(varbutton,varbutton &"," &Dropdown?.Selected.Value,)

 

Dropdown selected.value might be dropdown.selected.result if it is created witha distinct function

 

 

Now make label text property to equal varbutton

View solution in original post

stefanlive
Level: Powered On

Re: Button to put result of dropdown menu into a Label which they could add to again.

Thank you that worked a treat

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,841)