How to populate Look up column in SharePoint List using Canvas Apps
Hello !!!! Hope you are doing well. Welcome to Anything & Everything in Tech blog. In this blog, I will explain you how to populate look up column while creating a list row in SharePoint using Canvas Apps. I have a list called "User Report Log" and a look up column named "Acknowledgement" which is derived from Acknowledgements list.
For every operation in my canvas app I am creating a list item nothing but recording the user activities. Was wondering how to populate the Acknowledgement column? Well no issues, I used Patch request to create list item with the below format.
Patch( 'User Report',
Defaults('User Report'),
{
Acknowledgement: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ThisItem.ID,
Value: ThisItem.'Title'
}
}
)
ThisItem is the Acknowledgement list item. To populate look up column in a list basically you need to pass the Id and Value properties and prepare an object with the mentioned construct.
Hope this blog helped you. Please subscribe/follow for more insights.
Comments
Post a Comment