Skip to main content
1-Visitor
July 31, 2014
Question

Automatically filling multiple date fields

  • July 31, 2014
  • 1 reply
  • 3899 views

How can I automacially fill in multiple date fields when an item type is in a given state?

Ex:

When State="Sent"

Field Date01=date when state changed to sent + 0

Field Date02=date when state changed to sent + 1

Field Date03=date when state changed to sent + 2

Field Date04=date when state changed to sent + 3

Field Date05=date when state changed to sent + 4

So if State is "Sent" and the date is 7/31/2014 then field Date01 would be 8/01/2014, Date02 would be 8/02/2014 and so on.

We are using MKS Integrity 2009 SP5.


Thank you!

    1 reply

    16-Pearl
    August 4, 2014

    Hello Daniel!

    Could you use an assignment trigger, triggering on the condition State [new value] = Sent, or am I missing something?

    Regards,
    Kael

    DanR.1-VisitorAuthor
    1-Visitor
    August 4, 2014

    Why does it have to be a state transition? Is that the only way? What if I have 37 steps in a work flow, would I have to have 37 states? I have a 37 step checklist and as a give user completes a step they would click on the Picklist (Yes/No) associated with that step.

    16-Pearl
    August 4, 2014

    Ah! Good point, and an invalid assumption on my part.

    You could set a trigger so that those date fields were set every time the item was currently in that state instead, if you are okay with whatever values were previously in those datefields being overwritten. If you only wanted those datefields set when you first get into that state, you could base your rule on State[new value] = Sent AND State != Sent.

    Maybe there is something about the situation I am not understanding. You have a workflow with 37 steps. At some point in the workflow, while the item is in the state Sent, the user flips a picklist (Yes/No, let's call this booleanPick) from No to Yes and you want the dates to get populated. Does that sound like your scenario? In that case, when they set booleanPick to Yes, the state is already in Sent, and they hit Apply, you would like the date fields to get set? In that case, I would expect the trigger rule to be State[new value] = Sent AND booleanPick[new value] == Yes. If you wanted it to fire only when after the pick was set in the new state, you could use this rule instead: State[new value] = Sent AND booleanPick[new value] == Yes AND booleanPick == No. In that case, you would need to make sure booleanPick was set to No upon entering the Sent state, or you would need to make sure the user understood that they needed to set booleanPick to No, then apply the change, then change it back to Yes.

    Does that sound like what you are aiming for, or am I still missing something?

    Regards,
    Kael