Jul 14 2022 03:48 PM
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!
Jul 14 2022 04:32 PM
Solution@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.
Jul 15 2022 04:19 AM
@Beth_Culpepper If you want to hide columns from all list forms (new/display/edit), follow below steps:
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.
Jul 15 2022 06:20 AM
Jul 15 2022 06:21 AM
Jul 15 2022 08:40 AM
@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.
Jul 18 2022 06:05 AM
@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.
Jul 18 2022 10:03 PM
@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.