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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Wrapped Text lookup in...
Power Apps
Answered

Wrapped Text lookup in Repeating Table

(0) ShareShare
ReportReport
Posted on by 360

Requirement is to have a choice (drop-down/combobox/listbox) where the choices for the drop-down are much longer than we'd like to have the field show.

 

I started off trying to set a condition on the width property of the original combobox control with a variable so it's wide enough to show the whole description when clicked and reverting to the desired size (with truncated text) once selected. The variable is set with the OnChange property of the Category field so that the Material Group field is wide enough (covering the following field temporarily):

2019-10-28_10h25_17.png

 

The user can select an option without anything being truncated:

2019-10-28_10h29_16.png

 

The OnChange property of the Material Group combobox sets the variable back and we have our result truncated:

2019-10-28_10h30_09.png

 

With this approach if the user needs to choose a different choice they are all truncated unless they happen to click the Category first, so this isn't a viable option:

2019-10-28_10h34_29.png

 

Additionally, as we add more items this impacts the width of each row's Material Group field as we'll see below with the ListBox example. With the combobox if we could set the width just when the choices are shown only for that row it would be ideal (and how old InfoPath forms work out of the box), but I have yet to find a way to do that.

 

I then moved down the path of this great write-up on creating a wrapped-text drop-down like behavior using a label and listbox control. With the list box it's already "there" so when you click the label it's just making the listbox visible which is what makes it effective in a form use case.

 

The big issue for this, and the combobox approach, comes in with the field being within a gallery writing to a collection. Because we're controlling the visibility of the label and the listbox controls with variables it impacts all rows which is not a good result. In this example, the field in the third row was clicked and all row listboxes are showing - you don't see a line dividing the first and second row, but those are the first choices for each of those rows (not necessarily the value saved/selected) as you can see from what's been selected in the first image:

 

Material Group Label shown

Material Group Listbox shown

2019-10-17_16h50_05.png

 

2019-10-17_16h50_50.png

 

For this reason I moved away from using a variable since we can't (that I know of) limit it to impact just objects on this row. Similar to Shane Young's example of hiding/showing row buttons in a repeating table like form, I tried utilizing collection column data to control the visibility. The difference with this approach to the buttons is we need things to change before we write to the collection so we're 1) creating a lot more patch-work to the collection which also slows down the visibility behaviors, and 2) we're not seeing consistent behavior.

 

Abandoning that, I tried using a ListBox outside of the gallery but then run into "circular reference" errors when using the same variable updates as the ListBox inside the gallery.

 

While typing this all out I now have a thought of using a variable for each row where we name it using some data on the current row, if that's possible. In the meantime I'm hoping there's someone that sees this post who has run into a similar situation and found a solution that consistently works for them. If so, I will be greatly appreciative as I've been struggling with this for many days!

 

 

Categories:
  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @vwyankee ,

     

    In your screenshots, it seems that you are using a Gallery control. And for a gallery control, you decide the layout of every records by modifying the control and properties inside the template part of the gallery.  The template appears as the first item inside the gallery, on the left edge of a Gallery control in horizontal/landscape orientation and at the top of a Gallery control in vertical/portrait orientation. Any changes that you make in the template are reflected throughout the Gallery control.

     

    Sorry for the inconvenience and thanks for sharing your resolution here. Hope others could benefit from it.

     

    Regards,

    Mona

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard