1

I have a workflow that sets the field to [Today] when status = Setup. Once that field is set (either when created or when status changes to Setup), I don't want the date field to change to the current date, I want it to stay the date it was original set. How can I accomplish this in my workflow.

Workflow:

If Status = Setup
 then Set Setup to [Today]
 then Wait for Setup to equal [Today]
 then Stop the workfow and log..

4 Answers 4

1

Take current date in one variable of workflow and then work with that variable only

To set a DateTime field to [Today] days using a SharePoint Designer 2010 Workflow, this is what I did:

Create a Local Variable (ETA Date) of type Number Use a Do Calculation task in the workflow and set: value: Workflow Context:Date and Time Last Run (As Double) Output to: Variable: ETA Date

Finally, set the value of the respective field of the current item to the ETA Date variable

1
  • Please add more details regarding how to the thing you propose :) Commented May 5, 2014 at 11:54
0

You're setting a date field to "Current Date" in the Workflow. This date field won't change unless the same Workflow is run again. You must be executing the Workflow on creations and updates. I would create separate Workflows to handle creations and updates. Set the date field on create, but do not set it on update.

0

You can try to do it using the following approach: enter image description here

The first important moment here is that you have to set String variable to your Date field value. It is necessary, because later we need to check if this field is empty, but it is impossible to check Date field; however, it works well for intermediate String variable.

Also as the second part of the condition we should check whether our String variable is empty (which means that Date field is still empty). And in this case we can set Date field in the item to Today (I used a Date variable in my screenshot as I have no Date fields in my test current item).

Hope this approach could be used in your case. If so, please, don't forget to upvote and mark as answer :-).

0

Since you are setting a date-field to a date valued [TODAY] after or in the moment an item is created, then you can use an easy hack

If CurrentItem:Status is equal to 'Setup'
AND CurrentItem:Setup is less or equal CurrentItem:Created
Set Field Today to [TODAY]

Once the field STATUS is set to any date, it is greater than the SharePoint own "Created" field which is set once the list item was created. The workflow will never change that field again, no matter how often the workflow runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.