Solved

Run If date not blank

  • 15 February 2024
  • 3 replies
  • 37 views

Badge +1

We want a workflow to run if the date is blank.

For this we create a datetime variable and initiate it to blank.

Then we compare the date to this variable.

  1. It works if we run the workflow from the interface
  1. It does not work if some other application is adding a record with API.
    This can be solved by explicitely setting the datetime variable in the workflow.

The workflow is triggered when an item is created.

Current version: 5.2.7 runnong on SharePoint 2019 On Premise

icon

Best answer by oliver_goehre 26 February 2024, 15:25

View original

3 replies

Userlevel 6
Badge +22

Hi @oliver_goehre,

I can think of two possible reasons why the workflow is not starting when a record is added via the API.
 

  1. The API is altering the date column in some way, so to the workflow, it appears to be populated.
  2. The API uses a system account to create the record. Workflows will not start on item creation when they are created by a system account. This is a SharePoint limitation.
Userlevel 5
Badge +20

Hi @oliver_goehre 

Has this resolved your question? 

Badge +1

The workflow is started in both cases but the variable initiation is different. The problrm is solved by adding a task to set the variable and not to rely on the initial variable setting.

Reply