Forum Discussion
Sharepoint library metadata adding a calculated field based on another lookup field
- Jul 28, 2022
MarM79 Not sure what are you trying to do with JSON, but you can use lookup columns in JSON without any problem. JSON formatting works with internal name of the columns. So, make sure you are using correct internal names for your columns. Follow this article to get internal name of your SharePoint column: Find the Internal name of columns in SharePoint Online
Also, you would like to use the lookValue instead of lookupId to get the actual value like:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=[$SupplierNumber.lookupValue] + '-' + [$InvoiceNumber]" }Documentation: Use column formatting in SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
MarM79 Not sure what are you trying to do with JSON, but you can use lookup columns in JSON without any problem. JSON formatting works with internal name of the columns. So, make sure you are using correct internal names for your columns. Follow this article to get internal name of your SharePoint column: Find the Internal name of columns in SharePoint Online
Also, you would like to use the lookValue instead of lookupId to get the actual value like:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=[$SupplierNumber.lookupValue] + '-' + [$InvoiceNumber]"
}
Documentation: Use column formatting in SharePoint
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- MarM79Aug 22, 2022Copper ContributorThank you so much ganeshsanap! It worked!!!