cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

The property expects Record values, but this rule produces incompatible Table values

I have a single ComboBox with the data source being a SharePoint list of user Roles and Functions called RolesList.  Here's an example of this list:

 

Role     Function

Admin   Data Entry

Admin   Mailing

Admin   Meeting Planning

Other    Other Technical Work

Other    Database

 

The requirement is to display the set of functions based on the user's role in the drop-down portion of the ComboBox, but to also allow the user to search for a function that is not normally a part of their job (e.g., a admin helped with testing a database).

 

I've set the ComboBox Items property to SortByColumns(Filter(Distinct(RolesList, Function),StartsWith(Function,ComboBox1.SearchText)),"Result",Ascending).

 

In the ComboBox Default property, I've tried to use Filter(Distinct(RolesList,Function), usrRole = Role), but I get 'The property expects Record values, but this rule produces incompatible Table values' error message.

 

Any help is greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Advocate I
Advocate I

Re: The property expects Record values, but this rule produces incompatible Table values

Resolved it by changing the ITEMS property of the ComboBox to:

 

If(IsBlank(ComboBox.SearchText),Distinct(Filter(RolesList,usrRole=Role),Function),Filter(Distinct(RolesList,Function),StartsWith(Result,ComboBox.SearchText)))

 

The issue was that my original ITEMS property did not include the DISTINCT function in the True portion of the IF statement.  As such the results were 'Function' if True or 'Result' if False.  I added the DISTINCT function to both parts of the IF statement, set the DisplayFields and SearchFields (under the Advanced tab) to ["Result"] and left the Default property blank.

View solution in original post

1 REPLY 1
Advocate I
Advocate I

Re: The property expects Record values, but this rule produces incompatible Table values

Resolved it by changing the ITEMS property of the ComboBox to:

 

If(IsBlank(ComboBox.SearchText),Distinct(Filter(RolesList,usrRole=Role),Function),Filter(Distinct(RolesList,Function),StartsWith(Result,ComboBox.SearchText)))

 

The issue was that my original ITEMS property did not include the DISTINCT function in the True portion of the IF statement.  As such the results were 'Function' if True or 'Result' if False.  I added the DISTINCT function to both parts of the IF statement, set the DisplayFields and SearchFields (under the Advanced tab) to ["Result"] and left the Default property blank.

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,146)