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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get Value of from a dr...
Power Apps
Unanswered

Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hi All,

 

My app has 3 dropdowns and usually I have to send the data to be changed in 4 different places.

So, I created a gallery where I can fill up fields with text and selected items through dropdown.

 

As you see in the screenshot attached, there is a plus "+" button and when clicked, a new item of the gallery is created to be filled up.

 

My goal is to get the dropdown values to the new gallery item as the text fields are already coming through.

 

See my code below for the plus "+" button:

 

OnSelect

Collect(
 DetailCollection,
 
 {
 Id: Text(Last(DetailCollection).Id + 1),
 Sitename:Sitename.SelectedText.Value,
 Type: Type.SelectedText.Value,
 Maker: Maker.Text,
 Model: Model.Text,
 Capacity: Capacity.SelectedText.Value,
 Rrp: Rrp.Text,
 Currency: Currency.Text,
 Accidental: Accidental.Text,
 Liquid: Liquid.Text,
 TheftLoss: TheftLoss.Text,
 Theft: Theft.Text
 }
)

 

See screenshot bellow of the field:

2024-04-24 14.48.57 make.powerapps.com e2f45c06c839.png

 

I believe something is missing as the Text values are copied over, but not the dropdown values.

 

Any help is appreciated.

 

Kind regards,

 

Fernnado

 

Categories:
I have the same question (0)
  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    What is the datasource to your Dropdown?

     

    Did you try DropDown.Selected.ColumnName?

     

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @DBO_DV ,

     

    The datasource of my dropdown is hard coded on the items as:

     

    [
    "",
    "Option 1",
    "Option 2", 
    "Option 3"
    ]

     

     

    The data is not coming from Sharepoint or any other server yet.

     

     

    Cheers,


    Fernando

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Hi @fernandosilva ,

     

    Have you tried this version?

    Collect(
     DetailCollection,
     
     {
     Id: Text(Last(DetailCollection).Id + 1),
     Sitename:Sitename.Selected.Value,
     Type: Type.Selected.Value,
     Maker: Maker.Text,
     Model: Model.Text,
     Capacity: Capacity.Selected.Value,
     Rrp: Rrp.Text,
     Currency: Currency.Text,
     Accidental: Accidental.Text,
     Liquid: Liquid.Text,
     TheftLoss: TheftLoss.Text,
     Theft: Theft.Text
     }
    )

    Since you hardcoded the options the column name should be Value.

     

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @DBO_DV ,

     

    Yes, I have tried your version above and also didn't work.

     

    As you can see on the screenshot below, the (text) values are passing through, but not the selected options from the dropdowns.

     

    2024-04-25 08.46.56 make.powerapps.com 9fb418e119cf.png

     

    Anyone else in the community have achieved this goal before?

     

    Thank you,

     

    Fernando

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Hi @fernandosilva,

     

    I did use this method quite a few times. Do I get it right, that you want to display the values inside another dropdown?

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @DBO_DV ,

     

    I'm sure for some reason that works in another app, but this one is very simple and as you can see from the screenshot above, as soon as I click the plus (+) button, a new item with the same fields is generated underneath the first one that I filled up with the data. The text data from the first one is copied over to the second one, but not the dropdown selection from the first one to the second one.

    I tried all I could think about it and have no success.... 😕

     

    Cheers,

     

    Fernando

     

     

  • Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    Since you try to show it in another dropdown try this: 

    Collect(
     DetailCollection,
     
     {
     Id: Text(Last(DetailCollection).Id + 1),
     Sitename:Sitename.Selected,
     Type: Type.Selected.Value,
     Maker: Maker.Text,
     Model: Model.Text,
     Capacity: Capacity.Selected,
     Rrp: Rrp.Text,
     Currency: Currency.Text,
     Accidental: Accidental.Text,
     Liquid: Liquid.Text,
     TheftLoss: TheftLoss.Text,
     Theft: Theft.Text
     }
    )

     

    Since the other dropdown hast the same data source I think that this should work and solve the problem.

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @DBO_DV ,

     

    I have tried that option as well and didn't work.

    That's a very simple app and would be great to achieve this goal and probably that would help other users as well.

     

    I just can't figure out why the dropdown values are not passing through.

     

    Cheers,

     

    Fernando

  • Verified answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at

    In the default Property of your dropdown is there ThisItem.Type?

    If it is and it doesn't work, try to put the options in a collection instead of hardcoding them in the items property. This should make it even more efficient. 

    The collection gives you then he possibility to perform a LookUp in the default property. It is not possible to reference the items property of a dropdown in itself. 

     

     

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at

    Hi @DBO_DV ,

     

    That works flawlessly.

    All the options in different collections and the default changed.

     

    I hope this solution also helps many other user out there with the same issue.

     

    Thank you very much for your time and dedication to help me out sorting the issue.

     

    Kind regards,

     

    Fernando

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard