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:
The Choices field in "Choices":
PATCH statement with the DropDown commented out shows acceptance.
Once I remove the comment from the "Logo Removed" line, here is the error:
What am I missing here?
Solved! Go to Solution.
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.
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]
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
@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:
Values of two of the fields when in RUN mode:
One of the fields viewed from the Data tab of the table in Dataverse (expecting "YES"):
Hi @ChadBishop :
Set the combo box's items property to
["Yes","No"]
and try again.
Best Regards,
Bof
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.
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |