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

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
Frequent Visitor

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
Frequent Visitor

@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
Frequent Visitor

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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