Vergelyk / Toets vir Blank datums in SharePoint Designer Workflow

Scenario: In 'n SharePoint Designer workflow, you need to determine if a date field is blank.

Probleem: SPD does not provide a direct method for comparing dates to anything other than a date. You cannot create a condition like this: "If [DateField] equals blank".

Oplossing: Convert the date to a string. Use string comparison to determine if the date is blank.

Screen Shots:

The following screen shots show how to do this. In hierdie scenario, a field on an item, "Environmental Permits:First Permit Reminder Date", is submitted and the workflow fires in response.

beeld

beeld

Notas:

When I tried this, I was pleasantly surprised to learn that it works. I was worried that SharePoint Designer might disallow the string assignment (Veranderlike:StringReminderDateDate) but it did allow it.

I was also concerned that allowing it, the value might be null and either blow up the WF at runtime or maybe raise the global temperature 1/2 a degree, but those concerns were unfounded.

</einde>

Technorati Tags:

5 gedagtes oor "Vergelyk / Toets vir Blank datums in SharePoint Designer Workflow

  1. Tim

    Vrae:
    1) When I tried the above, it’s not working because the value of a blank date seems to be "?????" (Ek glo dit is 'n getransponeerde NULL waarde). Toe ek vertoon die inhoud van die dinamiese string, it shows up as "?????".

    2) Joe – when you wrote "If Field is greater than or equal to Today or Field is less than or equal to Today", do you mean that you can use variables like "Today" in werkstromen? As dit so is, Kan jy verduidelik hoe? Ek het geen geluk probeer, en ek het net in staat was om waardes wat bestaan ​​in die lys te onttrek.

    Antwoord
  2. Joseph
    Waarom nie net die toets van die toestand:
    As Field groter as of gelyk aan Vandag
    of Field minder as of gelyk aan Vandag
    This would give you an "if field is not blank, doen dit, anders (veld is leeg) doen wat"
    Antwoord
  3. Geen naam
    Groot wenk. Werk perfek.
    Nou is ek op soek na 'n manier om toset 'n nie-vereiste datum te leeg binne workflow. Enige idees?
    Antwoord

Laat 'n antwoord

Jou e-posadres sal nie gepubliseer word nie. Verpligte velde gemerk *