cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

All dropdowns have a error for 'Expected Record Value' after data source change.

Hello,

 

I changed an existing edit form over from Sharepoint to SQL server datasource. Everything works fine except for every drop down. 

I have many drop downs- some with a data source of a table(numeric) and other with choices (text).

The dropdowns load fine when clicked into.

The Default value of each dropdown produces an error now. They all display "Expected Record Value." "This formula uses scope"

Data type is numeric for lookups and text for choices (where I listed the choices in the Items of the dropdown).

PowerApps error message.png

Can any offer any ideas? I can't recreate the form as there are days of customizations made to fields. I also can't delete and reinsert data cards as the forms data source is a collection based on SQL server table. 

1 ACCEPTED SOLUTION

Accepted Solutions

@Andrew311 

First - Dropdowns and ComboBoxes are two entirely different things.  They need to be assigned values properly.

 

For the DropDown you are showing in the pictures, your default on the DataCard should be:

{Value: ThisItem.BearingTypeODE}

(PLEASE NOTE: The capital V in Value)

Your Default on the Dropdown control in your DataCard should be Parent.Default 

 

You should always observe using the Default property on the DataCard and then referencing it in your datacard controls - this will maintain the Unsaved functionality of the EditForm.

 

For ComboBoxes, there is a Default property, but it does nothing.  For those you need to utilize the DefaultSelectedItems property.  The "signature" of the record used in that property will be highly dependent on the items property of the Combobox - and must match in order for items to be selected properly.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

5 REPLIES 5
Super User III
Super User III

@Andrew311 

You appear to be trying to assign a numeric value to a datacard that wants to have records instead.  This is because you are using a ComboBox and the default items for a dropdown needs to be a record.

You would need your Default property to match the type of record that is in the ComboBox.

If you are using Choices, for example, you can also consider changing your Default datacard property to the following:

{Value: ThisItem.MotorMakeID}

However, again, whatever you have in the Value needs to match what is in the items record of the CombBox.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

I appreciate the help...

I started with the simple combo boxes- the ones that are 'choice' type. Using {Value:} did remove the error.👍

However the combo box will not display any value. For this record, ThisItem.BearingTypeODE="Ball"- I created a label to test this.  Ball is listed in items but will not display. See photos below.

DataCard Default.png

 

 

ComboItems.png

Of the many 'choice' type combos- the only one that is displaying properly with {Value:} is one that I had to change the the default value to a new new field (I changes the field name when migrating data to SQL server). 

 

Thanks in advance- I hate getting stumped like this on simple issues...

@Andrew311 

First - Dropdowns and ComboBoxes are two entirely different things.  They need to be assigned values properly.

 

For the DropDown you are showing in the pictures, your default on the DataCard should be:

{Value: ThisItem.BearingTypeODE}

(PLEASE NOTE: The capital V in Value)

Your Default on the Dropdown control in your DataCard should be Parent.Default 

 

You should always observe using the Default property on the DataCard and then referencing it in your datacard controls - this will maintain the Unsaved functionality of the EditForm.

 

For ComboBoxes, there is a Default property, but it does nothing.  For those you need to utilize the DefaultSelectedItems property.  The "signature" of the record used in that property will be highly dependent on the items property of the Combobox - and must match in order for items to be selected properly.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Using Value with a capital V worked amazing!

I am stuck with one last issue- when I open the form in edit form mode, the MotorMake is selected and displayed as the MotorMakeID instead of MotorMakeDescr.

Any ideas? Below are screenshots. Thanks you 🙂

combobox.png

Andrew311_0-1603826169854.pngmoment.png

 

 

@Andrew311 

Yes, you will need to set your Default property to a value that matches a record of your MakeCollection.  Not sure of the structure of that collection.

The easiest way to go about that would be to do a Lookup on the DefaultSelectedItems property of the Combobox.

Something like:

    LookUp(MakeCollection, MotorMakeID=Parent.Default.Value)

 

In general, to get an item to be selected, you need to provide that exact item (or table of items) in the DefaultSelecteItems property.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,368)