Removing Item From SharePoint

  • 15 October 2019
  • 3 replies
  • 5 views

Badge +1

Hello,


I have a form that sends off an e-mail and gives the user the option to Approve Or Reject the form. I just want to know if there is the functionality to remove the item from the SharePoint list if the page is Rejected? The reason I want it removing is to stop duplication and confusion. 

 

Thanks

C


3 replies

Badge +12

@Chris86t 

 

For your approach you will need the workflow to delete the item...but before deleting you need to make sure that any open loops or change states are closed.

 

Out of curiosity, instead of deleting the item, why don't you add 1 more choice in your approval called "Request More Information" (RMI) so that you can use the same item and continue? You can have Status field on the form and in the workflow you can also use the switch function to change states based on the status value.

Badge +1

That sounds like it would work perfectly Thank you. 

 

One thing that has just come to mind though. As it's a 2 stage approval process. So it goes to Team 1 first who complete their task and then send it on to Team 2. Who need to complete their task, If Team 2 reject the item can I get it to go straight back to Team 2 rather than going through the loop again?

 

Thanks

Badge +12

@Chris86t ......Yes it's possible using the workflow....you need to use Switch, State Machine, Set Workflow status

 

  1. Set Workflow Status as "In Progress"
  2. Add State Machine actions (you have to be careful when using this action, you need to make sure it does get close when you're done) and add below states
    1. Initial
      • Add Switch
        • If W/f Status is "Getting Team 1 Approval" - Change State to that branch
        • If W/f Status is "Getting Team 2 Approval" - Change State to that branch
    2. Team 1 Approval
      • Set Status "Getting Team 1 Approval"
      • Assign task to Team 1
        • If Approved --> Change W/f Status "Getting Team 2 Approval"
        • Change State to "Team 2 Approval"
        • If Rejected:
          • End State Machine
          • Delete item if you want
    3. Team 2 Approval:
      1. Assign task to Team 2
        • If Approved --> Change W/f Status "Team 2 Approved"
        • Change State to "Exit"
        • If Rejected:
          • End State Machine
          • Delete item if you want
    4. Exit: End State Machine

Assuming your worflow is running when an item is created and also when it's modified

Reply