cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
niklasjegg
Resolver I
Resolver I

Patch Lookup Multiple Choice Column to Sharepoint

Hello. I have 2 Sharepoint Lists. 1 "Contract_Database_test" and 2 "Contracting Party"

 

I have a Lookup Column in my Contract_Database_test list that looks up the "Title" Column of the Contracting Party List.

 

Then i have a Combobox with: Items set to 'Contracting Party' list and default is Defaults('Contracting Party') with Multiple selection turned on.

 

I want to patch the Multiple Selected items to my Contract database test list but i can only get 1 item to Patch.

 

My Formula :

 

 

Patch(Contract_Database_Test,Defaults(Contract_Database_Test),

                {Title:Title_Input_1.Text,
                ContractStatus:'Contract-Status_Input_1'.Selected.Value,
                Company:Company_Input_1.Selected.Value,
                Lookup_Contracting_Party:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                                            Id:Value(Contr_Party_Input_1.Selected.Identifier),
                                            Value:Contr_Party_Input_1.Selected.Title},
                ContractCategory:Contr_Category_Input.Selected.Value,
                TypeofContract:Contr_Type_Input_1.Selected.Value,
                Responsible:{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                                Claims: "i:0#.f|membership|" & Lower(Responsible_Input_1.Selected.Mail),
                                Department: "",
                                DisplayName: "",
                                Email: Responsible_Input_1.Selected.Mail,
                                JobTitle: ".",
                                Picture: "."
                        },
                ContractClosingDate:Contr_Close_Date_input.SelectedDate,
                SubjectofContract:Contract_Subject_Input.Text,
                Termination:Termination_Input.Selected.Value,
                Termination_x0020_reason:Termination_reason_Input.Selected.Value,
                TerminationOrdinary:Term_reas_Ordinary_input.Text,
                TerminationExtraordinary:Term_reas_Extraordinary_input.Text,
                Term:Term_Input.Selected.Value,
                TermLimited:Term_Limited_input.Text & " " & Term_Limited_Dropdown.Selected.Value,
                //'Term Unlimited':Term_Input.Selected.Value,
                Term_x0020_End_x0020_of_x0020_De:Endof_Dev_Proj_input.Text,
                Term_x0020_limited_x0020_until_x:Lim_then_Unlim_input.SelectedDate,
                Approval_x0020_Status:"Started"
                },
            Attachments_Form.Updates

        ));

 

 

Right now i have an error: The type or this argument "Lookup_Contracting_Party" does not match the expected type Table found type Record.

1 ACCEPTED SOLUTION

Accepted Solutions
niklasjegg
Resolver I
Resolver I

Somehow i got it to Work. my patch for the column looks like this 

Lookup_Contracting_Party:Contr_Party_Input_1.SelectedItems

 

 

the Default Propterty of my ComboBox is blank and the Items proptery is 

Choices(Contract_Database_Test.Lookup_Contracting_Party)

View solution in original post

1 REPLY 1
niklasjegg
Resolver I
Resolver I

Somehow i got it to Work. my patch for the column looks like this 

Lookup_Contracting_Party:Contr_Party_Input_1.SelectedItems

 

 

the Default Propterty of my ComboBox is blank and the Items proptery is 

Choices(Contract_Database_Test.Lookup_Contracting_Party)

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,528)