Getting Value From List in Workflow

There is a time when you need to check if the value in the list is empty or otherwise via workflow. Using this code you can get value of list column and you can check it in workflow.

Let’s say you want to check ‘checker 1’ column in task list. Then you want to assign state according to the value in ‘checker 1’, you can use workflowProperties. WorkflowProperties is an object created from the class SPWorkflowActivationProperties,¬†which make the link between the workflow and the SharePoint context.


Other than that you can use onTaskChanged. Here is an example


This code will check the value of ‘status’ column after any changes occur in ‘ontaskchanged1’ event driven.