cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vwyankee
Level: Powered On

Wrapped Text lookup in Repeating Table

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!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Wrapped Text lookup in Repeating Table

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Wrapped Text lookup in Repeating Table

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,402)