cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beatrizmoura26
Helper II
Helper II

Create a collection from a selection field, is it possible?

Guys, I have a selection type field on my form with 2 choices 1- full return 2 partial return. I would like that when a total return is selected, a collection will be created automatically from the items that appear when the order products are searched. it's possible?

2 ACCEPTED SOLUTIONS

Accepted Solutions

@beatrizmoura26 
OK, then I would recommend you COPY + PASTE the code that is working right now within your button to the OnChange property of the Dropdown/ComboBox.  Anytime the value in the Dropdown/ComboBox changes the code will execute.

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

Thak you very much

View solution in original post

6 REPLIES 6
mdevaney
Super User
Super User

@beatrizmoura26 
Yes, I believe this is possible.  Can you please give more info so I can replicate what you are trying to do?

@mdevaney 

I have 2 key fields 1 is the order number to which the customer and the order products are searched in my database.
In a selection field I have 2 options
1 - Full return
2 - Partial return.

What I wanted:

When the order number and order items were loaded, when selecting the option total return for this action of selecting the option total evolution, a Collection was created with this information.

Today I have a button that does this, but I would like it to be selected instead of having to click on that button

@beatrizmoura26 
Are you asking how to programmatically click a button?  You can do this with the Select command.

Select(your_button_name)

 

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

No, I want to stop using the button and put the creation of the collection from the selection

@beatrizmoura26 
OK, then I would recommend you COPY + PASTE the code that is working right now within your button to the OnChange property of the Dropdown/ComboBox.  Anytime the value in the Dropdown/ComboBox changes the code will execute.

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

Thak you very much

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,203)