cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Markb_01
New Member

Combobox selection shows empty rows

Dear Community,

I created a Form in Power Apps which is attached to a SharePoint List. Another SharePoint list contains the Application and Scope columns to which the combobox should be referred. Both columns are formatting as single line of text, with a one-to-many relationship. The combo box (#1) should show the distinct values of the Application column.

Yet, if I use the following code, the combobox shows empty rows (even though the Result of the Distinct function does show values):

Item property --> "Distinct("SharePointList_Name","Column_Name_Application")"

 

The combo box (#2) items should be filtered based the selected value in combo box #1. Yet, this combo box also shows empty rows and isn't filtered.

 

Would you be able to help discover why the values are not showing?


Thank you in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User
Super User

HI @Markb_01 ,

It would help to show actual code (rather than redact 90% of it) so the syntax can be checked, however you do not need the quotes

Distinct(
   SharePointListName,
   ColumnName
)

or if you only want one column in order

Sort(
   Distinct(
      SharePointListName,
      ColumnName
   ).Result,
   Result
)

You have not provided your code for the second box at all - but using the same principle

Sort(
   Distinct(
      Filter(
         SharePointListName,
         ColumnName1 = ComboBox1.Selected.Result
      ),
      ColumnName2
   ),
   Result
).Result

 

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

gabibalaban
Dual Super User
Dual Super User

@Markb_01 ,

Check the DisplayFields and SearchFields properties of the ComboBox1 to be set as:

gabibalaban_0-1635936051727.png

or 

Select the comboBox1, go to Fields and set the Primary text and Search Fields to Result:

gabibalaban_1-1635936148874.png

 

Hope it helps !

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

HI @Markb_01 ,

It would help to show actual code (rather than redact 90% of it) so the syntax can be checked, however you do not need the quotes

Distinct(
   SharePointListName,
   ColumnName
)

or if you only want one column in order

Sort(
   Distinct(
      SharePointListName,
      ColumnName
   ).Result,
   Result
)

You have not provided your code for the second box at all - but using the same principle

Sort(
   Distinct(
      Filter(
         SharePointListName,
         ColumnName1 = ComboBox1.Selected.Result
      ),
      ColumnName2
   ),
   Result
).Result

 

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

 

gabibalaban
Dual Super User
Dual Super User

@Markb_01 ,

Check the DisplayFields and SearchFields properties of the ComboBox1 to be set as:

gabibalaban_0-1635936051727.png

or 

Select the comboBox1, go to Fields and set the Primary text and Search Fields to Result:

gabibalaban_1-1635936148874.png

 

Hope it helps !

Thank you! The code did work.

Thank you! This did the trick eventually! 🙂 

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