cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
niklasjegg
Super User
Super User

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
Super User
Super User

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
Super User
Super User

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)

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (3,505)