Conditional formatting for item containing data

Occasional Contributor

Can anyone tell me how I can hide several fields that are needed to be seen in a View in SharePoint but not when the user fills out the fields for a new item?  I have borrowed some JSON to manipulate a view but when our users are inputting the criteria for the new item, I don't want them to see a few fields.  Is there a way to do that?  Thank you!

7 Replies
best response confirmed by Beth_Culpepper (Occasional Contributor)

@Beth_Culpepper Open an item on your list and select Edit Columns


Hover over the column you want to hide, click on the vertical dots, and select Edit conditional formula



Enter the formula and click save:


=if([$ID] >'0', 'true', 'false')


That will hide the column on new but not from the views or on edit.





@Beth_Culpepper If you want to hide columns from all list forms (new/display/edit), follow below steps:

  1. Go to the list & open any item to view the item details in the display form.
  2. At the top of the form, select Edit form > Edit columns.
  3. In the Edit columns pane, check (to show) or uncheck (to hide) the checkbox for the column or columns as needed.
  4. When you're finished, select Save.

Documentation: Show or hide columns in a list or library form 

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.

Brilliant! This worked perfectly, Pam, thank you SO much!
I tried this first but this did not work for me. Thank you anyway! The response above worked perfectly.

@PamDeGraffenreid I just tried using the code you provided and column is hidden from all the list forms (not just new form).

Previously [$ID] context was not available on the list forms. Does Microsoft added it recently?


I am getting below error message on developer tool console: ID was not found on the data object. 

Please consider giving a Like if my post helped you in any way.

@ganeshsanap Fair question... I tried using $ID because I saw another post recently where someone was able to to get it work. It is a supported column type with column formatting, and I don't see any exclusions listed here Show or hide columns in a list form | Microsoft Docs


@Beth_Culpepper If you have problems with that at some point with checking the ID column, look for another condition that might work.  Or jump back on, and we'll be happy to help you work out a condition that meets your requirements.

@PamDeGraffenreid That's great. Can you please share the link of post you saw?

I am still not able to get the [$ID] in form JSON formatting & conditional formulas.


Column & view JSON formatting is different from this scenario where I can get the [$ID] without any problem.

Please consider giving a Like if my post helped you in any way.