Forum Discussion

JoelGDucharme's avatar
JoelGDucharme
Brass Contributor
Mar 10, 2024

Formatting form header

I have a Sharepoint list for our contacts. I am formatting the form and want to change the header.

 

I used the example that adds 

 

 

 

"children": [
{
"elmType": "div",
"txtContent": "= 'Détails de ' + [$Title]"

 

 

 

 

 

 

 

The Title column of the list is the last name. It just does look right.

 

I would like to change the Title field to the full name of the contact, which is a calculated field adding first and last names. This field is called. [$Nom complet]. If I just change the field name, it shows the whole text that is between the quotes. 

 

 

I found in the advanced code for the list itself that the name of the column shows up like this : 

[$Nom_x0020_Complet].
 
So I tried that only to get this result:
It just doesn't show the name.
 
I tried another column to see if the problem was the calculated column. It still didn't work.
 
I'm new to json and Sharepoint list and still learning. What can I do to fix this.
 
Thanks
  • JoelGDucharme 

     

    Last time I checked, using calculated columns in the form header JSON formatting was not supported. Check details: How to get value of Calculated field in Header using JSON? 

     

    So, you will have to recreate the logic you used for your calculated column in the JSON formatting using JSON operators/functions.

     

    1. What is the formula used in your calculated column? I can suggest how to build same logic in SharePoint JSON formatting by looking at the formula.
    2. SharePoint JSON formatting works with internal name of columns. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?

    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.

  • JoelGDucharme 

     

    Last time I checked, using calculated columns in the form header JSON formatting was not supported. Check details: How to get value of Calculated field in Header using JSON? 

     

    So, you will have to recreate the logic you used for your calculated column in the JSON formatting using JSON operators/functions.

     

    1. What is the formula used in your calculated column? I can suggest how to build same logic in SharePoint JSON formatting by looking at the formula.
    2. SharePoint JSON formatting works with internal name of columns. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?

    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.

    • JoelGDucharme's avatar
      JoelGDucharme
      Brass Contributor
      Thank you! I found the internal name of the columns and it worked!

Resources