cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShaneITAutomate
Post Patron
Post Patron

Get a text field result from a collection in a gallery to show in a dropdown

Hi,

 

I have a gallery using a collection (made from a sharepoint list) as its source, i have a dropdown (no forms) that i wold like to show the text field as one of the dropdown fields with the other options For e.g.

 

The Text field is a column named Status the item is "Yes" and the other option is "No", how do i get the dropdown to show Yes and have the ability to change it to "No"?

 

Currently my Default code is

 

If(
    varMode="New",
    "",
    BrowseGallery1.Selected.Status
)

 

However it shows as empty.. i know ive done this before but i cannot find the old app.

 

Ps (I cannot change the source to a choice column)

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @ShaneITAutomate ,

Is that a Drop-down or Combo Box ? If a Combo Box, it depends on the Items, but assuming the output is .Value, the DefaultSelectedItems would be

{
   Value:
   If(
      varMode <> "New",
      BrowseGallery1.Selected.Status
   )
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @ShaneITAutomate ,

Is that a Drop-down or Combo Box ? If a Combo Box, it depends on the Items, but assuming the output is .Value, the DefaultSelectedItems would be

{
   Value:
   If(
      varMode <> "New",
      BrowseGallery1.Selected.Status
   )
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Perfect, Thanks again @WarrenBelz i couldn't remember or find the code for the life of me.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,999)