I have some SharePoint experience pretty much self taught so experience is somewhat beginner to intermediate and have done some custom workflows, presently using SharePoint 20210. I currently have a task to create a workflow that as people put a leave request in the calendar it goes through an approval process but the catch is the boss doesn’t want it visible/entered in the calendar until its approved. (I have one built to where it appears as “Pending” than changes to approved when done.) I’ve tried doing custom and tried using the built-in workflows but not sure how to make that happen, can’t figure how to not show until approved. Is this something that it should it be doing out of the box with the built-in workflows and I’m just missing something or does that need to be scripted or customized?
I don’t think you can modify the list field properties using built-in workflows. You can try writing an event receiver that hides the respective workflow status column/other columns until the workflow is approved. You can either try setting it as Hidden or set ShowInDisplayForm, ShowInNewForm, ShowInEditForm, ListSettings, VersionHistory properties of the field to false and then revert.
We can use this add-on to set the properties manually to confirm if it’s working as expected and then build it into an event receiver.
https://spc3.codeplex.com/wikipage?title=ShowHideFields&referringTitle=HomeÂ