0
votes

New to the forums. I'm having a problem initiating a workflow on a specific date. I want to get feedback from our clients when a user gets a new device.

The conditions/actions Ultrabook has been deployed to the end user = Yes Survey Email Sent = Flag to eliminate user receiving more than one email in case row is ever updated in the future. Pause until Survey Distribution Date - This is a calculated field that takes the deployment date and add 14 days to it. Format is date and time Update item in current item updates the Survey Email Sent column to Yes.

I can't seem to get the survey to send when the 14 days are up so that the "Survey Distribution Date" is equal to the current date. I feel like I'm missing something... any help would be greatly appreciated.

Stage:Stage 1

If Current Item:Ultrabook deployed Y/N equals Yes
and Current Item:Survey Email Sent equals No
    Pause until Current Item:Survey Distribution Date
    If Current Item:Survey Distribution Date equals (ignoring time) Today
        Email Current Item:Recipient
        Update item in Current Item

Transition to stage Go to End of Workflow

Screenshot of Designer Workflow Code

2

2 Answers

0
votes

Sorry I don't get how to put pictures or code into the comments field.... Very confusing...

This is the code I am using. Does this make sense?

Stage:Stage 1
Loop: 1
    The contents of this loop will run repeatedly while: Current Item:Survey Distribution Date is less than 1901-01-13 12:00:00
        Pause until Current Item:Survey Distribution Date
        If Current Item:Survey Distribution Date equals (ignoring time) Today
        and Current Item:Survey Email Sent equals No
        and Current Item:Ultrabook deployed Y/N equals Yes
            Email Current Item:Recipient
            Update item in Current Item

Transition to stage Go to End of Workflow

0
votes

Pause until only takes the initial value of 'Current Item:Survey Distribution Date' into account. After the deployment date is filled in the value of the Survey Distribution Date will also be updated, but Pause until will not use this value.

You will some sort of a looping functionality. The nicest way to do this is to use 'Transition to Stage' (because it supports multiple conditions) and let it 'loop back' to the beginning of the same stage if all of the conditions are met:

**Stage: WAITING**

Pause for 1 days, 0 hours, 0 minutes
Transition to Stage
If Current Item:Ultrabook deployed Y/N equals Yes
and Current Item:Survey Email Sent equals No
and Current Item:Survey Distribution Date is greater than Today
    Go to SENDING THE EMAIL
Else
    Go to WAITING


**Stage: SENDING THE EMAIL**

Email Current Item:Recipient
Transition to stage
Go to End of Workflow