There are requirements to show hide fields or enable/ disable fields based on business requirements for selected values. Today I am going to share how can we can show hide field in a SharePoint list form based on logged in user.
I have a issue tracker list created using Issue tracking list template which I will be using for logging issues. I will hide issue discovery field on the SharePoint list form if logged in user is the same as Assigned To field so that user cannot modify Issue Description field.
Select any list item / document from the SharePoint list or library and expand the Edit Form button click on the Edit Columns.
This will show you complete list of Columns from the list, you can hide few columns form here and can change the order of the columns. Click on the three dots next Issue Description column name and select Edit conditional formula.
A dialog will be opened, now you need to enter a formula to hide the field if Issue Description option is selected.
=if([$Assignedto.email] == @me, ‘false’,’true’)
Once you hit the save the button, the issue description field will be greyed out because it has the formula. Now you can test it by accessing the list view or edit form.