Skip to main content
Nintex Community Menu Bar

Conditional Logic

  • Oct 31, 2016 3:07 PM UTC
  • 11 replies
  • 34 views
  • Translate All

Forum|alt.badge.img+11

I have a SharePoint (2013) list. I want to create a Nintex workflow (2013) that if the Status column changes to 'Closed' from any other status, then add a 'Closed Date'. If the 'Status' column is already set to 'Closed', DO NOT change the 'Closed Date'. How can I set the logic up to do this?

11 replies

Forum|alt.badge.img+11
  • Nintex Partner
  • Oct 31, 2016 4:14 PM UTC

In your Workflow-Settings you configure your workflow to start on item modified - conditional. In the conditions you can access your status field and check if it's "Closed". You can also check for the previous value of that column to see if it was not "Closed".

Regards

Philipp

Translate

Forum|alt.badge.img+11
  • Author
  • Oct 31, 2016 6:41 PM UTC

Currently, I am doing that. But I will need to add code in the workflow itself. What do I need to add there?

Translate

Forum|alt.badge.img+14
  • Scholar
  • Oct 31, 2016 9:14 PM UTC

wouldn't it be enough to check the condition like status == 'CLOSED' && IsNullOrEmpty(Closed_Date)?

Translate

Forum|alt.badge.img+11
  • Nintex Partner
  • Nov 1, 2016 6:53 AM UTC

That sounds perfectly fine as well.

So what do you need code for?

Translate

Forum|alt.badge.img+11
  • Author
  • Nov 2, 2016 1:24 PM UTC

Hmmmm ‌ that may work. I need code to set the 'Closed Date'. If it was previously closed I don't want to set the date - only if it was just changed. That was the problem the user was having. Regardless of when the item was closed it would set the 'Closed Date'.

Translate

Forum|alt.badge.img+11
  • Author
  • Nov 2, 2016 1:33 PM UTC

I don't see IsNullOrEmpty() in the Inline Functions list. Can you please give me a screenshot of what ya'll have in mind?

Translate

Forum|alt.badge.img+11
  • Author
  • Nov 2, 2016 5:33 PM UTC

 and  - I MAY have gotten this to work. I removed the start-up condition they had for Add. I left the start-up condition for Modify. Then I simply added the 'Set field value' and set 'Closed Date' = current date. No need to do an if statement or anything since it will get in the workflow on the right condition. I'm waiting on the user who wanted me to fix it to see if that will work for them. I think I was making this harder than it needed to be. I'll keep you updated.

Translate

Forum|alt.badge.img+14
  • Scholar
  • Nov 2, 2016 6:38 PM UTC

in workflow you have to use set condition action

Translate

Forum|alt.badge.img+4

I suppose this issue has been resolved?

Another thing i wanted to add. Working with dates and checking if it's empty is a bit tricky. You can also check if a date is smaller than a certain date (we use 01/01/2000)

An empty date may equal the dates 01/01/0001 or 01/01/1900 (there is a logic to this, but i'm not fully certain i've found it yet) 

Translate

Forum|alt.badge.img+11
  • Author
  • Nov 8, 2016 2:08 PM UTC

I'm waiting on the user to come back to let me know it worked. He had to work on something and is supposed to get back to this.

Translate

Forum|alt.badge.img+14
  • Scholar
  • Oct 17, 2017 7:10 PM UTC

Hi ‌, still waiting on a user? happy.png

Translate