cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cfebvre
Kudo Collector
Kudo Collector

Is it possible to display more than two fields in a combo box

Hi all,

 

As stated in the title, is it possible to display more than two fields in a combo box?

It appears not to be possible, I've tried manually editing the 'DisplayFields' property and adding a third Sharepoint Column but this does nothing.

 

Screenshot 2020-10-30 102301.jpg

 

I know there is one workaround, which is to use and AddColumns() Function in the items property, then Concatenate two or more columns, then select that new combined column in the 'Fields) property of the combo box - however this seems to cause a Delegation problem. (PowerApps does not display the usual warning, however my filtered choices in the ComboBox are incomplete so I assume this is what is happening).

 

Doe sanyone know of a different method that does not create a delegation problem?

 

Cheers in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @cfebvre ,

Not as separate items, but you could use AddColumns() to your query and concatenate the extra columns, then display the new field.

 

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @cfebvre ,

Not as separate items, but you could use AddColumns() to your query and concatenate the extra columns, then display the new field.

 

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.

Thanks @WarrenBelz ,

 

Yeah, I'm aware of that workaround and have tested it out, as original post, but it appears to create a delegation issue when I then filter that new concatenated column. (no warning triangle, or blue underscore, but the list of choices is incomplete).

 

It's as I suspected, don't think it can be done - at least not for the use I need it for.

 

I'll mark you as an accepted solution though so people searching for this can find it - might be of use to others.

 

For me, I think rather than combo box, I might try a 'pop out' gallery instead, and users can select a required item from that gallery, then I'll get it to do the hocus pocus I need it to on Select.

Thanks @cfebvre ,

I actually use galleries that for this purpose quite often - you can make the user experience similar to a combo box with a lot more flexibility.

Zameer
New Member

Yes,
as i need to display  more than 2 fields in comboBox,

For this i created one more property in my EntityModelClass.cs.

Ex: 

[NotMapped]
public string DisplayName {
get
{
return string.Format($"{ecName} {ecProgram} {ecAcademicYear} {ecSemester}");
}
}

 

Then in XYZForm.cs class set ComboBox's Value Member and DisplayMember properties and then fetch data from Database and copy in ComboBox.DataSource property as follows .


Ex:

cbInstitute.ValueMember = "ecID"; //This is my database table ID primary key, which i'm setting as a value for comboBox.

cbInstitute.DisplayMember = "DisplayName"; //defined above property in EntityModelClass.cs class.

cbInstitue.DataSource = context.EntityModelClass.ToList(); 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,907)