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

Patch a DropDown to sharepoint expected type error

Hi guys, me again.

 

The following Problem occurred.

 

I have a Dropdown menu filled with Data from a Dataverse table. 
Now I have to save the selected from the Drop down to Sharepoint List, with a column "Single-Line Text"

 

With DropDown sample the following code always works.

 

Patch(
    Verfahrensverzeichniss,
    Defaults(Verfahrensverzeichniss),
    {
        Title: Ver_nam.Text,
        ID_Ver:Ver_ID.Text,
        Status: Status_DropDown.Selected.Value
    }
);

 

If the Drop down has custom data that doesn't work.

 

The following error occurs: "The Type of this argument #Status' does not match the expected type 'Text'. Found type 'Error' "

 

I tried multiple other ideas. 

 

Status: Status-Dropdown.Selected

Status: Status-Dropdown

Status: Text(Status-Dropdown.Selected.Value)
Status: Text(Status-Dropdown.Selected)

Status: Value(Status-Dropdown.Selected)
Status: Value(Status-Dropdown)

 

Non of them worked. 

 

The problem is, I also have to path it, that if I select the List item in the drop down menu the saved item should be default. 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@RiccoHipp 

Have you tried referencing the Dataverse column name that you want to patch? For example, if your Dataverse table contains the column StatusDescription -

Status: Status-Dropdown.Selected.StatusDescription

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@RiccoHipp 

Have you tried referencing the Dataverse column name that you want to patch? For example, if your Dataverse table contains the column StatusDescription -

Status: Status-Dropdown.Selected.StatusDescription

That worked.

Referencing 

Status_DropDown.Selected.'Status (cr24_status)' <- For me


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,825)