SharePoint 2010 - Workflow randomly shows canceled - sharepoint

When a item is approved from the manager task the workflow updates a entry in a calendar list with the status approved. This workflow fails sometimes with the following error.
The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Access Denied
I have no idea why this happens. Here is my workflow code

Your images are not showing up so this is hard to diagnose, however it seems like you are trying to pass the wrong type of value to a variable, such as a string to a date/time.

Related

Running SharePoint 2013 Manual Workflow triggers List Update workflow

I have a SharePoint 2013 list, within it I have a workflow that starts when a list item is updated. This workflow emails people regarding a data change to the list.
I also have a second workflow on that list that can only be run manually which will do some reporting on demand for an item on the list (user checks an item, goes to Workflows, and runs it).
The problem is: When the second manual reporting workflow runs, it also causes the list item update workflow to trigger, which in turn spams my users when no real data change occurred (other than the workflow status field), or at least, it's not a data change that I care about.
Question: How do I prevent the "update workflow" from starting when I'm running the manually-started reporting workflow?

SharePoint workflow Current Item is being ignored after a Pause

I have a questions I hope someone has the answer to.
it is a 2010 workflow running on a SharePoint 2013 hosted environment.
The workflow was created by an "Admin account"
I have edited the workflow using my account which is part of the admin group on SharePoint. I am using SharePoint designer to edit the workflow.
The workflow doesn't throw any errors and my code should "work" in theory/practice because it is rather simple.
Here's the problem:
The workflow pauses until it reaches a date
-When it comes out of the pause, it seems to ignore my case statement.
All my debugging logs indicate it should go down an IF statement but it doesn't
One other IF statement works just fine coming out of the PAUSE.
Else if Current Item:Category equals value PTO
Category is a drop down field
The debug log says Category = PTO
Every item in the field statement is obtained from a Pick List!
I have moved this statement to the top of the IF list and it will still be ignored.
I don't understand why it is not dropping into this IF statement while another case it works fine.
Could it be a permission issue?

Add fields to Sharepoint Workflow Task

I'm currently making a pretty simple approval workflow in sharepoint using sharepoint designer. One of the design goals that we have for this workflow is that we want to minimize the amount of custom coding that we have to do so I'd appreciate answers that involve using sharepoint designer instead of whipping out VS.
So the workflow should start when a person adds an item to a list.
When the workflow kicks off it would create a task and and assign a due date of +2 business days and assign the responsibility to a group of users
When a user completes the task then it would record the individual person who completed the task as well as the date it was completed.
It's pretty easy to add fields to the list but the purist in me kind of balks at this since these fields would be null and it violates first normal form. Ie a list that went to Task1 but not Task2 would have four fields Task1ApprovedBy, Task1FinishedDate, Task2ApprovedBy, Task2FinishedDate and both the Task2 fields would be null.
--edit--
Sorry If I'm not being clear about the question. I'm using Sharepoint Designer and I would like to update a list item in a lookup when a user completes a task item. How do I select the last task for a particular item that was completed and update that last task two values "Completed By" and Completed Date values? I'd prefer to do this on the Task list since that would also make reporting easier. I'd just create a view on the Task list instead of doing some type of join between the two list to when a particular task was completed.
Thank you for the help!
Jason
It sounds like you need two workflows here. One on the "Main" list and one on the "Tasks" list:
The first workflow is tied to the "Main" list. It fires when a user creates a new list item in the "Main" list. This workflow simply creates a new item in the "Tasks" list (with the correct people assigned, description, dates, etc...)
The second workflow is tied to the "Tasks" list. It fires whenever an item in the Tasks list is changed. The workflow checks to see if the status field is "Complete". If it is, then assign the "Completed By" field to the current person editing the task and assign the "Completed Date" value to today.
(Note that, in a SharePoint Designer workflow, there is no way to evaluate the properties of the list item prior to the update. If a completed task is updated, the SPD workflow will be unable to determine that the task was already completed. Basically, each update to a completed task will update the Completed By/Date fields. If you want a more complex workflow - which only updates when the status is changed to "Complete" - you will need to use Visual Studio).

Block SharePoint workflow from running unless prerequisites are met

I've got a scenario where I want a workflow to not run if a certain condition is true, otherwise to run when a list item is created. The scenario is for a people management system. If a new list item (staff member) is added to the list then the workflows job is to go between the various departments and get everthing setup. Eg payroll, IT account ect. One of the fields is Start Date that may or may not be entered. If it is entered then I don't want the workflow to run when the item is created. I want the policy on the list to start the workflow on that date. I can add some code into the workflow to end itself if the date is in the future but then this will show as completed on the list. This is a problem because the workflow shouldn't show that it's run as in effect it's waiting for the date to be correct.
In other words, is there something in onWorkflowActivated that allows me to stop the workflow from triggering so that nothing shows up in the site, in essence to suppress the workflow from running as if it was never triggered by the OnCreated event.
Can you add a new step at the beginning of the workflow to fill in the Start Date? I think this makes sense in terms of your workflow because the HR person has an action item on their plate: enter the start date.
Otherwise you could make Start Date a required field on the sharepoint list.
This is SharePoint Designer version, see if you can use the same activities in VS
Create a second workflow that executes the rules after StartDate is set
In the main workflow, create a step with the action 'Wait for Field Change in Current Item' and config it to 'StartDate not Empty'.
The next action will be a 'Start Workflow', executing the second Workflow you created.
You also have a Stop Workflow activity

Sharepoint Designer - Creating a simple Workflow, check status of another Workflow

I'm trying to create a simple workflow using the Sharepoint Designer. We already have one user-defined workflow, called Internal Approval. This creates a column with the same name.
Basically, my workflow should perform:
Conditions:
if Internal Approval equals Approved
and Status equals Draft //custom field I want to set, this works
The problem, after a quick debug, is that the Internal Approval does not equal to Approved nor contains it, Internal Approval equals 16.
The question: what is this number, and can I rely on it always being 16 for an approved workflow?
Or better, how can I check a if another workflow was approved?
May be this could help you Workflow Status
Reference Article from MSDN, just type case the above Enum to Integer you will get the values.
Also to filter based on the Workflow Status in the View. Refer

Resources