cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tsglavind
Frequent Visitor

Dropdown Dependency on TextBox

Heya Community

 

I have an issue regarding a TextBox (Gallery_Level1) in a Gallery and a dropdown (or a Dropdown Dependency, if you will) where the dropdown is supposed to .

I have a tabel (Levels) with a column (Level1) and a dropdown (DD_Levels) which shows the correct possible values from Level1. The issue arrises with the TextBox not showing the values that also appear in the dropdown. In a perfect world the TextBox would include all instances of a value identical to the one given in the dropdown but im simply not there yet. Any suggestion is welcome

 

This is my current attempt:

Filter( Levels, Level1 = DD_Level1.Selected.Result, Level1)

 

 

 

3 REPLIES 3
WiZey
Super User
Super User

Hello @Tsglavind ,

 

Naming a gallery "TextBox" sure made me confused for a while.

 

Are you trying to populate this gallery "TextBox" with the same items from the dropdown? Or do you want to append each selected item from the dropdown to the gallery "TextBox"?

Yeah sorry. The "TextBox" is a Text Label and i would like to append the chosen value of the dropdown to the Text Label

WiZey
Super User
Super User

Would something like this work for you? In the "OnChange" of your dropdown:

 

Patch(
  source,
  ThisItem,
  {Level1:$"{ThisItem.Level1};{Self.Selected.Value}"}
),
Reset(Self)

 

This will append the selected value from your dropdown to your "Level1" column of your gallery. The "Reset(Self)" helps resetting the dropdown to automatically re-display its default value for user convenience.

 

 

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.

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 (5,519)