Skip to main content
Nintex Community Menu Bar
Solved

Run If date not blank

  • February 15, 2024
  • 3 replies
  • 76 views

Forum|alt.badge.img+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

Best answer by oliver_goehre

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.

3 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+23
  • Nintex Employee
  • February 15, 2024

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.

MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • February 19, 2024

Hi @oliver_goehre 

Has this resolved your question? 


Forum|alt.badge.img+1
  • Author
  • Rookie
  • Answer
  • February 26, 2024

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.