none
Quantifying "NULL" in Sharepoint Designer 2013 RRS feed

  • Question

  • I am a bit new to Sharepoint Workflows and development so this could be an easy question but, I am trying to figure out how to quantify NULL as a value I am looking for in an If statement.

    The purpose of the workflow is to notify a user when he/she had been assigned a task. However, I found an issue with my original workflow in that if there was no one assigned to the task, the workflow would loop and fail and I would have to stop the workflow. So I am now trying to figure out a catch for this. What I am trying now is this. Notice the "" part is not valid and that is what I need help with.

    Set Variable:assignedTO to Current Item:Assigned To //Sets an Workflow variable assignedTo to whatever is in the field 'Assigned To'

    If Variable: assignedTo equals ""

       Email Current Item: Created By //Emails whoever created the task if the task is set to unassigned

    If Variable: assignedTo not equals ""

       Email Current Item:Assigned To //Emails the assigned person the correct email if the task is assigned.

    and then the workflow continues on its merry way until the task is completed. The "" part is what I am having trouble with. Sharepoint doesn't seem to acknowledge blank strings or values in SP 2013 and the new SP Online. I did some searching and could not find a very simple or intuitive way to get past this.

    Your help in this matter would be greatly apprecated. Thank you.

    Tuesday, December 31, 2013 1:30 AM

Answers

  • Hi,

    According to your post, my understanding is that you wanted to quantify "NULL" in SharePoint Designer 2013.

    In SharePoint Designer 2013, if you select ‘Assign to’ column in the condition, you can only select ‘equals’ or ‘not equals’. However, if you select String type value in the condition, you can select ‘is empty’.

    You need to create a String type workflow variable, then create workflow as below:

    Then if the ‘Assign to’ column quantify "NULL", the workflow will log ‘1’.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support




    • Edited by Lindali Wednesday, January 1, 2014 2:50 AM
    • Marked as answer by JasonGuo Monday, January 6, 2014 1:41 AM
    Wednesday, January 1, 2014 2:49 AM

All replies

  • Hi,

    See this forum replies, work around suggested should help you -

    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/6dc36021-5c7d-4d70-8ead-afa36c45dfd5/how-to-check-for-the-date-is-null-in-sharepoint-designer-condition-?forum=sharepointcustomizationlegacy

    Hope this helps!



    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/

    Tuesday, December 31, 2013 6:56 PM
  • I appreciate you trying to help, however, SP Designer 2013 is vastly different from SP Designer 2010. They removed the ability to check for empty variables in SP Designer 2013 Workflows.
    Tuesday, December 31, 2013 7:29 PM
  • Hi,

    According to your post, my understanding is that you wanted to quantify "NULL" in SharePoint Designer 2013.

    In SharePoint Designer 2013, if you select ‘Assign to’ column in the condition, you can only select ‘equals’ or ‘not equals’. However, if you select String type value in the condition, you can select ‘is empty’.

    You need to create a String type workflow variable, then create workflow as below:

    Then if the ‘Assign to’ column quantify "NULL", the workflow will log ‘1’.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support




    • Edited by Lindali Wednesday, January 1, 2014 2:50 AM
    • Marked as answer by JasonGuo Monday, January 6, 2014 1:41 AM
    Wednesday, January 1, 2014 2:49 AM