Skip to main content
Nintex Community Menu Bar

Date form was last updated

  • July 21, 2020
  • 15 replies
  • 77 views

Forum|alt.badge.img+3

I have a form where users enter data about their project statuses. I was originally going to create a  field called Date Form Was Last Updated, but then I thought I can just use SharePoint's built in  Modified date to see when the user made changes to the form.

 

The problem is, I have workflows that run on that list in order to gather data for reports. When the workflow runs, it changes all the Modified dates (and the Modified By fields also).

 

Is there any way around this problem, or do I need to create a new field called Date Form Was Last Updated and ask the user to enter a date each time they make updates?

 

Thanks

15 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 22, 2020
"Is there any way around this problem, or do I need to create a new field called Date Form Was Last Updated and ask the user to enter a date each time they make updates?"

Close.
Create the column but have the form update the column with the current date everytime it is submitted.

Forum|alt.badge.img+3
  • Author
  • July 22, 2020

Thanks Simon.

 

I created a new date/time field in my list called DateLastUpdated

 

You wrote: "have the form update the column with the current date every time it is submitted".

 

How would I do that? Thru java script on the form? Or with a workflow?  And if I run a different monthly workflow on the entire list (to prepare for my reports), it won't change that new DateLastUpdated field?

 

Is there also a way to do the same thing for Modified By (for the person who saved the form)?

Thanks again!


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 22, 2020
Hi,

You could update the column in many ways.
A form variable that updates the column or a calculated value control etc.

Forum|alt.badge.img+3
  • Author
  • July 23, 2020

Simon

 

Thanks for writing. I'm not sure I understand how to do this...can you provide the steps for the easiest way?

 

Thanks again!


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 23, 2020
Add a Calculated Value control to the form.
Connect it to your DateLastUpdated column in SharePoint.
Formula is Current Date from the Common tab.

Forum|alt.badge.img+4
Create a form variable with a default value of current date and time and another form variable that grabs current user details (use runtime functions/common tab in the formula bar) and connect both to two different columns on SharePoint that will tell you when and who updated the form.

Forum|alt.badge.img+3
  • Author
  • July 23, 2020

Thanks for writing. I am using SharePoint 2013 and Nintex 2013 by the way.


Simon: I added a Calculated Value field to my form. But I can't connect it to my DateLastUpdated column in SharePoint. The Connected To drop down in the Calculated Value field only shows Single Line of Text fields.

 

BigBlockChevy: I created 2 form variables in my Nintex form: var_CurrentDate (formula: CurrentDate from the Common tab) and var_CurrentUser (formula: CurrentUser from the Common tab).  You said connect both to two different columns on SharePoint.  How do I do that? If I drag a Calculated Value field onto the form, I run into the problem I mentioned to Simon above, where the Connected To only shows single line of text fields.  If I drag the DateLastUpdated field into the form and click Connected To, my variables aren't listed.

 

I'm so confused! Help.

 

Thanks


Forum|alt.badge.img+3
  • Author
  • July 24, 2020

Thanks for writing. I am using SharePoint 2013 and Nintex 2013 by the way.


Simon: I added a Calculated Value field to my form. But I can't connect it to my DateLastUpdated column in SharePoint. The Connected To drop down in the Calculated Value field only shows Single Line of Text fields.

 

BigBlockChevy: I created 2 form variables in my Nintex form: var_CurrentDate (formula: CurrentDate from the Common tab) and var_CurrentUser (formula: CurrentUser from the Common tab).  You said connect both to two different columns on SharePoint.  How do I do that? If I drag a Calculated Value field onto the form, I run into the problem I mentioned to Simon above, where the Connected To only shows single line of text fields.  If I drag the DateLastUpdated field into the form and click Connected To, my variables aren't listed.

 

I'm so confused! Help.

 

Thanks


Forum|alt.badge.img+4
that is correct you will not be able to connect either a form variable or a calculated field directly onto a column other that single line of text.

for the current user input just add a people control onto the form and specify the value as current user then connect it to your sharepoint column and use rules to hide the control so it doesnt show on the form

as for the current date column you can have the workflow capture that info after the form is changed and have it inserted into the modified column OR you can use JavaScript to copy the information from the form variable to the date control

let me know if you need help

Forum|alt.badge.img+3
  • Author
  • July 28, 2020

Hi BigBlockChevy:  You wrote: "as for the current date column you can have the workflow capture that info after the form is changed and have it inserted into the modified column OR you can use JavaScript to copy the information from the form variable to the date control"

 

How would I use JavaScript to copy the info? Could I copy both date and time?

 

Thanks!


Forum|alt.badge.img+4
check this below (Check Leif's code):

https://community.nintex.com/t5/Nintex-for-SharePoint/Setting-current-date-and-time-on-control/td-p/40430

however this is associated with a button, so for your case you can use the submit button to submit the document and set the date field as well

Forum|alt.badge.img+3
  • Author
  • July 28, 2020

Thanks for writing. I looked at the link you provided but I don't understand.  How do I connect JavaScript to the Submit button? I don't have experience with JavaScript so i'm confused.

 

Also, you wrote: "for the current user input just add a people control onto the form and specify the value as current user then connect it to your sharepoint column".

I created a people picker field in my list called ModifiedBy2. I put that field on my form and made the default value=current user.  Is that correct? But the ModifiedBy2 only gets filled in with a brand new form. If a user edits an existing form, that field stays blank.

 

Thanks


Forum|alt.badge.img+4
for the date field give me some time because need to test the solution on my end

as for the people control it doesnt work because the control might be in Auto mode it should be in edit mode all the time

Forum|alt.badge.img+4
small correction cotrol mode should be on edit during editing the form
and disabled when in New and Display mode so it doesnt change that field

set the people control mode to edit then
use rules to disable the control and in formula bar go to common tab and use OR runtime function with (Is Display Mode, Is New Mode) being your conditions for disabling the control

Forum|alt.badge.img+3
  • Author
  • August 3, 2020

Hi BigBlockChevy
Thanks for trying..but I'm not having any luck. I don't quite understand what you mean.  I'm ready to give up.

Thanks anyway. 🙂