Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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..
share|improve this question

3 Answers 3

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

share|improve this answer
    
Please add more details regarding how to the thing you propose :) –  Robert Lindgren May 5 at 11:54

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.

share|improve this answer

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 :-).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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