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

Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

I have a Gallery where I have added 2 Inputs, 1 Checkbox and 1 Dropdown

Checkbox OnCheck : Patch(Collection,ThisItem,{IsChosen:true})

Checkbox OnUnCheck : Patch(Collection,ThisItem,{IsChosen:false})

Dropdown Items : AnotherList

Dropdown2  Items : (Which is not part of the Gallery) : AnotherList

 

So what I want is, I want to be able to press a button that would change any Dropdown that IsChosen = true to whatever is selected in Dropdown2 on the touch of a Button.

 

I have tried many many different configuration of this but it always fails. First time I select the Gallery.Items it works but afterwards it's all broken. Either it doesn't keep the Selected Value or either I only select Items with the Checkbox and they change without the press of a Button

 

 

Please help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

@yanni99 

I would suggest using this code within the OnSelect property of a button that is placed outside of the Gallery.

UpdateIf(
    Collection,
    IsChosen=True,
    {your_field_name: Dropdown2.Selected.Value}
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

10 REPLIES 10
Super User
Super User

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

@yanni99 

I would suggest using this code within the OnSelect property of a button that is placed outside of the Gallery.

UpdateIf(
    Collection,
    IsChosen=True,
    {your_field_name: Dropdown2.Selected.Value}
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

yanni99
Level: Powered On

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

Thank @mdevaney for your quick reply. 

 

However, the value I want to change is not in Collection yetThe Dropdown Items are from AnotherList. I want to be able to change the Dropdown later manually if I want to. That's where my problem lies. Can't figure it out.

Super User
Super User

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

@yanni99 

You said this: 

The value I want to change is not in Collection yet

 

Did you mean this instead?

The column I want to change is not in the collection yet

 

yanni99
Level: Powered On

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

Yes, this makes more sense. I want to change a dropdown to what would later be a column in my Collection. But I still want to be able to change it at will before patching it to my Collection. Does that makes sense?

 

 

Super User
Super User

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

@yanni99

Keep in mind that a Collection must have the same columns at all places in your app.  You cannot have a Column in one place and no Column in another.

 

No, I do not understand the meaning of 'at-will'.

 

The best way to show me what you want would be to take some screenshots describing how a user will click-through the app and what the collection should look like before and after.

yanni99
Level: Powered On

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

Here you go, Hope this clears things up

 

ezgif.com-video-to-gif.gifezgif.com-video-to-gif (1).gif

Highlighted
Super User
Super User

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

@yanni99 

Thank you for providing the GIFs.  I am still unclear about what is desired here.

 

The code I supplied is intended to make the app behave just as you showed in the video of the app playing.  Perhaps I am missing what 'is not happening' and needs to be corrected in your app.

Community Support Team
Community Support Team

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

Hi @yanni99 ,

Do you mean that after you click a button, drop down1 will display the value of drop down2 selected and this value has not existed in drop down1's Items?

I'm afraid it's not supported now.

The value that one drop down displays could only from its data source.

If the value hasn't existed in the drop down's data source, it will not display.

For example, if the drop down's Items is: [1,2,3,4,5]

The drop down could only display 1/2/3/4/5, 6 will not display until you patch 6 into the drop down's Items.

So I suggest you firstly patch drop down2 selected value to drop down1's data source and then display the selected value in drop down1.

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
yanni99
Level: Powered On

Re: Change selected Gallery Items added Dropdown to Dropdown2.selected.Value

I used your formula but it was only solving part of my problem. 

 

What I did is, instead of using dropdowns in my gallery, I used buttons that opens a popup with all the same Items in the dropdowns and it is working great. Way easier than working with a dropdown.

 

Thank you for putting me on the right path.

Helpful resources

Announcements
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

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

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 (7,944)