Using Item Properties from Insert Reference Issue


Badge +5

I have a e-mail being sent that contains a start date and end date of travel.  When using Insert Reference and selecting Start Date and End Date from the Item Properties, it is not picking up the correct Start Date.  It is using yesterday's date or  today's date.  The End Date is correct.  Any thoughts?


22 replies

Userlevel 6
Badge +12

Hi Suzanne,

How are you setting the start date on the list item?  Is this via a default value or something else?

Cheers,

Chris

Badge +5

Hi Chris - Below is my list Start Date.  Should I use a different default value?

182296_pastedImage_0.png

Badge +7

Hi Suanne,

The way you are setting up the start date here will just give you a blank start date.  The default value at this step does not really matter.  Does the start date get changed before the email is sent?  Where do you set the value for the start date field?  Is it filled in by a users? Or by the workflow itself?

Regards,

Francois

Badge +5

It is filled in by the user.  We have the resources submit their travel requests in the first quarter, so the dates will be throughout the year.  We manually start the workflow 45 days to the Start Date.

The date does not get changed unless the user edits the request prior to the workflow being started.

Thanks,

Suzanne

Badge +7

Hi Suzanne,

It sounds like the Start date is linked to the action date for some reason. In Nintex you have the option to link a variable to the action execution date or today which sounds somewhat like your scenario.   Can you double-check this?

Can you send a screenshot of where you put the start date into the email?

Badge +5

The correct date for this travel is 5/23/2016 to 5/27/2016.  As you can see it used 4/4/2016. 

182316_pastedImage_0.png

The request for travel was created on 4/5/2016

182317_pastedImage_1.png

I am just stumped by this!

Thanks,

Suzanne

Badge +7

Thanks Suzanne,

Can you also send a screenshot of where you set it up in the workflow?  With all the {startdate} variables in the email.

Badge +5

Workflow:

182318_pastedImage_0.png

Workflow Send Notification e-mail:

182319_pastedImage_2.png

I selected the Start Date and End Date from Insert Reference, Item Properties, and then selecting Start Date.  Did the End Date the same way.

182320_pastedImage_3.png

Userlevel 6
Badge +12

Hi Suzanne,

It looks like something is modifying the start date because the screen shots that you've provided look OK.  It's very strange that someone enters 23 May and the email says 4 April.  If they were one day apart then I'd be looking to investigate timezone/daylight savings issues.  e.g. if the user is in a different part of the world to the server etc.  However a date that's 40+ days apart is not that (I checked to see if it was 45 days apart but it wasn't).

So, can you do a few things:

  1. Go to the SharePoint list and see what start date is displaying for that same item you've listed above.  Temporarily modify the view to show the column if it isn't being displayed.  This will tell us if the date has been changed somehow.  If it is displaying as 23 May then we have further work to do
  2. If the date is 4 April then you'll need to look through the form first.  Is that changing the date somehow?  Best way to test is to have someone fill in and save the form and check what the date says.  Do not have any workflow kick off automatically just in case it's the workflow that modifies the date.
  3. If the form doesn't change the date to 4 April then it's time to look through your workflow from the start to see if you're manipulating the date somehow (e.g. update item) or is there a different workflow that's doing this?  The clue might be in your 45 day start - was there anything that attempted to calculate that date?

Cheers,

Chris

Badge +7

Hi Suzanne,

I would add a Log-to-History actions and add a description of where or just Step1, step 2 etc. and the Start date Variable at a few different steps in the workflow, i.e. 1 Log in history action = Step 1 - {Start Date}, 2nd Log in history = Step 2 - {Start Date}, etc.

I'll add this log into history action at the beginning of the workflow, before the assign flexi task, before the email and then again after the email.  Then kick of a dummy approval that runs through the process and see at what stage the date changes or is it wrong from the start.

Let me know if you did this.

Badge +5

Hello Chris,

1. on the list for the screenshot above the list is showing 5/23/16 - 5/27/16

182365_pastedImage_0.png

2. Created new request, date did not change once the user submitted.

182369_pastedImage_1.png

3. I will test the newly created request to see if the date changes.  The workflow is manually started.  I kickoff the workflows 45 days prior to the start date of the travel.

Thanks,

Suzanne

Badge +5

Ok - I sent the newly created travel request through the workflow.  The Sr. Manager notification for approval has the correct dates.

182371_pastedImage_0.png

The approval notification e-mail has the incorrect date...again

182372_pastedImage_1.png

Userlevel 4
Badge +11

Hi Suzanne,

just a quick check..are you sure that the StartDate reference you are using in the notification is the ItemProperty and not the reference with the same name under common tab?

you can check in the html of the mail, if the reference is Common:StartDate then you are using the wrong reference..

Giacomo

Badge +5

Hello,

I am selecting the start date from the Item Properties.

182373_pastedImage_3.png

Badge +5

Hello,

Dates on Original list request submitted.

182393_pastedImage_1.png

According to the Workflow History that I can see the date did not change.

182394_pastedImage_2.png

Is there another workflow history I can check?

Thanks - Suzanne

Userlevel 4
Badge +11

Hi,

could you share with us the html code of the notification email, take from the send notification action in the workflow designer?

Giacomo

Badge +5

Also the approval e-mail notification still has the incorrect date.  It is using yesterdays date, even though it was created 4/7 and approved on 4/7.

182395_pastedImage_0.png

182396_pastedImage_1.png

Badge +5

Holy Cow Batman!!!! --you're Right, even though I am selecting it from Item Properties it is using Common.  What do I do now?

182397_pastedImage_0.png

The end date is using Item Property.

182398_pastedImage_1.png

Userlevel 4
Badge +11

If you try to insert a new reference to Start Date, is it created with reference to common variable?

If not, you can try to add a set Variable in your workflow to set an existing variable to your Start Date field, then if you go with the mouse over it you should see on the tooltip something like {ItemProperty:FieldName}

Screenshot (7).png

This is to check if SharePoint has putted in some strange characters in the fieldname, once you have done that, you can delete the set variable and you edit your html replacing the common%3AStartDate with ItemProperty%3AFieldName

Badge +5

It's fixed!!!!  Thank you so very much for your time!!!

Userlevel 6
Badge +12

I wonder if this is a bug and something to do with the fact you have a column name the same as one of the reserved field names.  Would you mind please logging a support call for this Suzanne so the Nintex engineers can investigate?

Cheers,

Chris

Badge

I actually have a similar issue. My list column is a calculated date field and when I use it as a reference in an email, it always shows as the day before.

182409_pastedImage_0.png

182417_pastedImage_2.png

182418_pastedImage_3.png

Reply