Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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

 

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    Finally, I'm happy I could help.

     

  • fernandosilva Profile Picture
    Super User 2024 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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

     

  • Verified answer
    DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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

     

     

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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

     

  • DBO_DV Profile Picture
    4,534 Super User 2025 Season 1 on at
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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
    Re: Get Value of from a dropdown and pass to a new item of the gallery win the same dropdown

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,991 Most Valuable Professional

Leaderboard