Forum Discussion

MarM79's avatar
MarM79
Copper Contributor
Jul 25, 2022
Solved

Sharepoint library metadata adding a calculated field based on another lookup field

Hello all,   I have been trying to do this forever since is giving me a lot of issues, but I am not able to figure out how to implement. I am storing in sharepoint all the invoices and managing th...
  • ganeshsanap's avatar
    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]"
    }

     

    DocumentationUse 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.

Resources