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

PATCH is not accepting DropDown Values

Data Source: Dataverse
Drop Down Control gets its items from a CHOICES object. 

I've created a PATCH that worked as intended until I added a dropdown control. Now the PATCH is throwing an error. I'm using "Dropdown1.Selected" as stated in online videos and documentation, however PowerApps will not accept it. 

 

Is there a known problem with PATCHing from a dropdown? 

The Choices field in the main table of Dataverse:

ChadBishop_0-1635183015915.png

 

The Choices field in "Choices":

ChadBishop_1-1635183071713.png


PATCH statement with the DropDown commented out shows acceptance. 

ChadBishop_2-1635183113001.png

 

 

 

Once I remove the comment from the "Logo Removed" line, here is the error:

ChadBishop_3-1635183147224.png

 

 

What am I missing here? 

1 ACCEPTED SOLUTION

Accepted Solutions
ChadBishop
Advocate I
Advocate I

After replacing all of the CHOICE fields with TEXT fields and working with Microsoft Support...it was determined that this line in the PATCH() was the cause of the error but did throw any errors (if that makes any sense at all).
'Completed By (Step 05)': VALUE(txt_CompletedBy_Step05.Text)
...
Once VALUE() was removed, the data began writing correctly.

View solution in original post

5 REPLIES 5
GarethPrisk
Resident Rockstar
Resident Rockstar

As noted in the error, it is expecting a Table of records. Choice(s) vs. Choice indicates you are patching to a multiple selection option set.

This simplest thing to do here is to use a ComboBox instead of a Dropdown. This gives you SelectedItems property, and also the control will allow multiple selections.

If you have to keep a Dropdown, then you would switch it to:

'Logo Removed': [Dropdown1.Selected.Value]
v-bofeng-msft
Community Support
Community Support

Hi @ChadBishop :

Agree with @GarethPrisk ,but using '[ ]' may cause an error,you could also consider trying this:

 

'Logo Removed':Table(Dropdown1.Selected)

 

Best Regards,

Bof

ChadBishop
Advocate I
Advocate I

@v-bofeng-msft  & @GarethPrisk thank you for your response however I still cannot get this to work. 

I've added new text fields to Dataverse to get completely away from a CHOICES column. I've created a COMBO BOX as suggested. However, the PATCH is not updating the table. I have no errors in the PATCH() statement. 

 

What am I doing wrong? Is this a Dataverse problem? 

 

PATCH() code:

ChadBishop_0-1635447832628.png

 

Values of two of the fields when in RUN mode:

ChadBishop_1-1635447886264.png

 

One of the fields viewed from the Data tab of the table in Dataverse (expecting "YES"):

ChadBishop_3-1635447941200.png

 

 

Hi @ChadBishop :

Set the combo box's items property to 

["Yes","No"]

and try again.

Best Regards,

Bof

ChadBishop
Advocate I
Advocate I

After replacing all of the CHOICE fields with TEXT fields and working with Microsoft Support...it was determined that this line in the PATCH() was the cause of the error but did throw any errors (if that makes any sense at all).
'Completed By (Step 05)': VALUE(txt_CompletedBy_Step05.Text)
...
Once VALUE() was removed, the data began writing correctly.

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.

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 (4,821)