cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

How to patch a SharePoint Lookup Column that has a default based on Gallery Selection

I have a list form that has ProjectID datacard.

 

The Default value of the ProjectID datacard= 

{ '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID : Value('Project Gallery'.Selected.ID),
Value: 'Project Gallery'.Selected.Title}

 

When I try to save the form to sharepoint all of the fields save except the ProjectID field.  I have tried SubmitForm and I have also tried:

Patch('ProjectList',Defaults('ProjectList'),
{ProjectID:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
ID:'Project Gallery'.Selected.ID,
Value:'Project Gallery'.Selected.Title}
}
)

 

I am unsure as I get "Invalid argument type, Expecting a record type, but of a different Schema"  Is there any Solutions.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: How to patch a SharePoint Lookup Column that has a default based on Gallery Selection

The record format is case sensitive. "ID:" should be "Id:". Give that change a try and see what happens.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How to patch a SharePoint Lookup Column that has a default based on Gallery Selection

The record format is case sensitive. "ID:" should be "Id:". Give that change a try and see what happens.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Highlighted
Helper III
Helper III

Re: How to patch a SharePoint Lookup Column that has a default based on Gallery Selection

YES!! Thank you. I stared at my screen for hours. I appreciate it!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,918)