cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kevin_Maxwell
Level: Powered On

Submit/Patch multiple results/items from Collection to SharePoint list

I'm trying to insert new collection results to SharePoint list. However, I get "An error occurred on the server.". I have checked all my required fields and non of them are causing issues. Am I missing something? Is there any other method to use?

 

 

ForAll(Beneficiary_Collection,
Patch(Beneficiary,
    {
    Beneficiary_Code: Beneficiary_Code,
    Order_Number: Value(Order_Number),
    First_Name: First_Name,
    Last_Name: Last_Name,
    Gender:
    {
    '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp( Gender_Lookup, Gender = English_Def, ID ),
    Value: LookUp( Gender_Lookup, Gender = English, English_Def )
    },
    Date_Of_Birth: Date_of_Birth
    })
)

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin_Maxwell
Level: Powered On

Re: Submit/Patch multiple results/items from Collection to SharePoint list

I just found the answer and it is Defaults(Beneficiary). So, in order to create new values, basically Defaults should be used.

 

End result:

 

ForAll(Beneficiary_Collection,
Patch(Beneficiary, Defaults(Beneficiary),
    {
    Beneficiary_Code: Beneficiary_Code,
    Order_Number: Value(Order_Number),
    First_Name: First_Name,
    Last_Name: Last_Name,
    Gender:
    {
    '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp( Gender_Lookup, Gender = English_Def, ID ),
    Value: LookUp( Gender_Lookup, Gender = English, English_Def )
    },
    Date_Of_Birth: Date_of_Birth
    })
)

View solution in original post

1 REPLY 1
Kevin_Maxwell
Level: Powered On

Re: Submit/Patch multiple results/items from Collection to SharePoint list

I just found the answer and it is Defaults(Beneficiary). So, in order to create new values, basically Defaults should be used.

 

End result:

 

ForAll(Beneficiary_Collection,
Patch(Beneficiary, Defaults(Beneficiary),
    {
    Beneficiary_Code: Beneficiary_Code,
    Order_Number: Value(Order_Number),
    First_Name: First_Name,
    Last_Name: Last_Name,
    Gender:
    {
    '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp( Gender_Lookup, Gender = English_Def, ID ),
    Value: LookUp( Gender_Lookup, Gender = English, English_Def )
    },
    Date_Of_Birth: Date_of_Birth
    })
)

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,795)