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?
This is how I managed to do it:
From the Calendar web part page…
- Add a new field to Calendar Web part.Â
Calendar tab->List settings-> (columns) Add from existing site columns
select “task status” from the list of columns -> Add -> OK - Make this field invisible. Under List settings page:
Event->Task Status (column)-> Hidden (radio button) -> OK - Condition visibility of approved items. under List settings page:
(Views section) Create view -> Calendar view
Name it as you wish (ie. Approved)
(Filter section) “Show items when the following is true” (radio button)
(Show the items when column) select “Task Status” from the list of columns
Leave “is equal to” as it is
in the blank field below this, enter “Completed” (without quotes)
click OK to save - Go back to the Calendar web part.
under Calendar Tab, click Calendar Overlay -> New calendar
Calendar name: same as view (ie. Approved)
Select a different color if you don’t want default
under web URL click “Resolve” button
Make sure “your calendar” is selected under “List:”
Select “Approved” from List view
Click OK to save.
I hope this helps.
This is not possible. Â One option would be to just set all views of the calendar to only show “approved” items. Â This would still allow someone to see the “pending” requests but they would need to create their own view to do that.
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Â
I don’t believe this is possible. Â You may be thinking about the publishing process that is available in a Document Library.
One idea would be to possibly use another calendar and then duplicate the items on the main calendar once they are approved.
Please note that the assumption here is that you aren’t writing custom code. Â With custom code, I would probably setup an event receiver that immediately locks down the permissions of the new calendar item to the current user and supervisors. Â Then, once the approver indicates their approval, you could reset the permissions for the item back to standard list permissions.