cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ljkeefe
Helper I
Helper I

Expected Record Value error with dropdowns in form

I have two SharePoint lists, List A is for entry of Business information from PowerApps and List B houses all the information for the individual business such as an address, hours of operations, phone number, etc. 

The following fields that I'm using for both lists in PowerApps are:

 

Business Name: Choice field in SharePoint

Business Name: DropDown in PowerApps

I have a split screen in PowerApps, the right side is an EditForm1 for user input and the left side is a View Form that I'd like to have populated with all the business information (from List B) once the user chooses a Business Name on the EditForm1

EditForm1's data source is List A - users enter inspection information here. Business name is a dropdown here.  Item property is empty 

ViewForm's data source is List B - Item property is 

Filter([@SharePointListB],'BusinessName'=Dropdown2.Selected.Value)

 

DropDown2 is the dropdown to select a business name on the EditForm1. This is a choice field in both SharePoint List A and B. 

I get the following errors:

ljkeefe_0-1637285541084.pngljkeefe_1-1637285575574.png

I thought maybe it was the brackets around [@SharePointListB] but I get the same errors without the brackets. I've searched all day for a similar issue with a solution but I haven't found one that works.

I also tried the LookUp function without success and the same erros.

Any help is appreciated.

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ljkeefe ,

Try

LookUp(
   SharePointListB,
   BusinessName.Value = Dropdown2.Selected.Value
)

 

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

16 REPLIES 16
WarrenBelz
Super User
Super User

Hi @ljkeefe ,

Try

Filter(
   [@SharePointListB],
   BusinessName.Value = Dropdown2.Selected.Value
)

 

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

Thanks for the response, @WarrenBelz . I came across a post with your suggestion in it, tried without success, and I've tried it again without success. I receive the Expected Record Value error. 

The BusinessName is a dropdown in both the EditForm and the ViewForm, could it have anything to do with that?

Urbain
New Member

Hi ljkeefe,

 

I am new to the discussion boards, but have been playing with Power Apps in my free time for almost 2 years now. I developed an App about a year ago that is similar to what you are describing. It was built for a contractor evaluation being done by our internal employees.

 

I have three SharePoint lists total. One for storing the data collected during the evaluation, and two others that store lookup information.

 

Form Screen Shot.jpg

 

On the left, I do not have an edit form, but just simple labels with a combobox and two dropdowns. On the right, I have a View Form that displays the data on the two LookUp information lists. The Dropdowns filter the LookUps based on the selection made in the ComboBox. All information on the corresponding SharePoint Lists are Single Line of Text columns.

 

Tree View.jpg

 

The Contractor Combobox has the following formula in Items:

SortByColumns(Distinct('Contract Employees'.'Contract Company','Contract Company'),"Result")

 

In the General Foreman Dropdown - Items:

Sort(Filter('Contract Employees','Contract Company'=CNTRSelectComboBox.Selected.Result),'Full Name',Ascending)

 

In the Circuit Dropdown - Items:

Sort(Filter('2021 Planned Circuits',Contractor.Value=CNTRSelectComboBox.Selected.Result),Circuit_x0020_ID,Ascending)

 

Form on the left:

CNTR DataCard.jpg

On the ViewForm on the right, I only have the three DataCards associated with the selected fields. Within each DataCard, I deleted the Combobox/Dropdown and inserted a Text Input. The Text Input field has a simple command to show the selected answer on the left:

CNTRSelectComboBox.Selected.Result

 

Within each DataCard I added simple labels to LookUp the information on each corresponding list that I wanted. In the Text formula for each is:

"Phone: " & LookUp('Contract Company Information', Company = CNTRSelectComboBox.Selected.Result, Phone)

 

Since the whole evaluation has some 17 questions, I created multiple pages with the questions. On a final page there is a Confirmation Form, that pulls in all the selected answers throughout the App. The final "Submit" only submits data from the Confirmation Form to the SharePoint List. But the first page as described above is what is similar to your situation.

 

I hope this helps you in your situation.

@ljkeefe ,

What sort of field is BusinessName in your list?

@Urbain ,

Thanks for your insight, but the issue here is a single field type mismatch

BoHamad
Frequent Visitor

Hi,ljkeefe

 

LookUp([@SharePointListB],LookUp(‘BussinessName’,Value=Dropdown2.Selected.Value).Value=Dropdown2.Selected.Value)

 

Hope that works

Best regards

BoHamad

@WarrenBelz Hi Warren, Business name is a Choice column in SharePoint.

Hi @ljkeefe ,

If it is a single choice then (as I posted)

Filter(
   [@SharePointListB],
   BusinessName.Value = Dropdown2.Selected.Value
)

 should not receive any errors - is it a multiple choice and also the are the Items of Dropdown2 (and is it a drop-down or combo box)?

Hi @BoHamad ,

Thank you for your reply. Your suggestion did not work either. It's giving me "Invalid number of arguments" and "incompatible types for comparison" errors.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,575)