SOLVED

Formatting form header

Copper Contributor

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. 

 

Image 2024-03-10 à 16.56.jpeg

 

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:
Image 2024-03-10 à 16.58.jpeg
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
2 Replies
best response confirmed by JoelGDucharme (Copper Contributor)
Solution

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

Thank you! I found the internal name of the columns and it worked!

1 best response

Accepted Solutions
best response confirmed by JoelGDucharme (Copper Contributor)
Solution

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

View solution in original post