Skip to main content
Nintex Community Menu Bar

How do I know if a Workflow coming from a Create or Modify Event?

  • February 21, 2017
  • 16 replies
  • 71 views

Forum|alt.badge.img+9

Basically, I want to write one workflow to cover both situations. I; however, want to change some wording based on whether the workflow is coming from a create or a modification.

I don't want to stick another column in the list called "new item" and update it.

I think there's a way to do this--but I can't find it.

16 replies

rhia
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • February 21, 2017

Hmm.. well, I suppose that would depend. If you were requiring a major version update each time, you could look at the version column -- if 1.0, then this branch; if larger than 1.0, a different branch.

Would that work for you?


Forum|alt.badge.img+9
  • Author
  • February 21, 2017

It's a thought. 

Thanks,

Stephan


Forum|alt.badge.img+9
  • Author
  • February 21, 2017

The particular library I'm using isn't being versioned. I probably could turn it on--but I'd like to find another way.


Forum|alt.badge.img+14
  • Scholar
  • February 21, 2017

rhia
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • February 21, 2017

This looks like a good alternative but it does recommend adding another column, which I think Stephan doesn't want to do.


That would have been my initial suggestion as well... but surely there must be something unique, by default, that a newly initiated form displays... hmm. I still can only think of ...

OH WAIT. What about Modified Date? If Modified Date is equal to Created Date? It would have to include time and be identical, but ... the only time that'd ever be true is on creation.

Would that work for you ‌ ?


Forum|alt.badge.img+14
  • Scholar
  • February 21, 2017

Rhia Wieclawek, do you refer to the post marked as correct?

my suggestion there doesn't need any additional column in the list...

the link I provided should point directly to my post there, but sometimes browsers do not recognize/find an anchor within the page and end up at the top of page

I'm not aware of any OOTB reliable way to identify within workflow on what event it was started.

problem with modified/created dates are that

- they are just in minute-level precision. within a minute several changes can be be made.

- if items are created/updated from a program code, there are ways to do it so that version number and timestamps do not change


rhia
Nintex Partner
Forum|alt.badge.img+15
  • Nintex Partner
  • February 21, 2017

Ah yes, I see now - sorry, browser took me directly to the top post.


Forum|alt.badge.img+13
  • Novice
  • February 22, 2017

Good solution


Forum|alt.badge.img+14
  • Scholar
  • February 22, 2017

thanks happy.png


Forum|alt.badge.img+9
  • Author
  • February 22, 2017

Where's the Created Date? All you have is modified date.


Forum|alt.badge.img+9
  • Author
  • February 22, 2017

Looks harder than creating 2 workflows.


Forum|alt.badge.img+13
  • Novice
  • February 22, 2017

So if you create 2 extra workflows, one that runs on start and one that runs on modify, and both those workflows start your main workflow, you'll know what action started the workflow. You can even pass a variable from your first mini workflows to your main workflow, if that helps.


Forum|alt.badge.img+9
  • Author
  • February 22, 2017

My experience with workflows starting other workflows is not good. I've seen humongous delays. I'd rather use a column.


Forum|alt.badge.img+14
  • Scholar
  • February 22, 2017

hm, I don't think so.

if you create two full-functional workflow, likely you will duplicate plenty of functionality.

as well, if you already have the workflow (partly) developed, I see it as easiest approach without touching existing logic/functionality.


Forum|alt.badge.img+14
  • Scholar
  • February 22, 2017

then I would maybe focus on resolving these delays. I use it regularly and haven't experienced such issues.

I would rather say I have minimum workflows that do not start other workflows.


Forum|alt.badge.img+9
  • Author
  • February 22, 2017

This would work. However, in my case the list is preexisting and versioning wasn't enabled. So the older items are now version 1 and they are not really new.

I'm biting the bullet and adding a NewItem column. I'm setting the default to "Yes" and immediately updating to "No". I'm also updating the ones with a null value to "No" when they been worked on.