cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Time Stamp based on value in another field?

I need help figuring out how to stamp a date, once another field has been updated.

In the screenshot, once a User enters a value in the "ServiceNow ID" field, I would like the "ServiceNow EntryDate" to be stamped.  Any way to accomplish this as a calculated field?  Or do I need to use JS (gulp)?

Labels: (2)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Time Stamp based on value in another field?

Hi Jeremy,

I believe if its at form level you would need to resort to JS. if you want to avoid JS do you also have access to nintex workflow?  You could just create a Nintex list workflow on item update/create and update the date stamp if the service now ID is filled with any value?

If its JS then as well its not very difficult though. You would just need to be sure that you update the value at the very end (i.e. after the user clicks the save button etc).

Regards,

Shrini

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Time Stamp based on value in another field?

Thank you for the reply!

I have another date field (calculated field) that autopopulates when a User saves the form.

formatDate(Created,'MM/dd/yyyy hh:mm tt')

Is there no way to make a formula like this work based off the ServiceNow ID field being completed?  Or would I put a similar formula in the JS area?  

0 Kudos
Accept as Solution Reply
Highlighted
Workflow Hero

Re: Time Stamp based on value in another field?

Hi Jeremy,

Calculated fields gets changed depending on what formula you apply. But in case of textboxes you would need to set the value on them either through Javascript or through "Default Value". Default value would only be useful for loading it the first time. I.e. not on change event of any other field. 

You can set the value of the field via JS invoked through a button click.

NWF$('#' + varServiceNowDateTimeStamp).val(NWF$('#' + varFormatedDate).val())

Where 

varServiceNowDateTimeStamp - variable name for ServiceNowDateTime

varFormatedDate - variable name for formattedDate

I am assuming you do the basic check that this code fires only if the existing field is not empty (to not overwrite previous date) and also the ServiceNowID field is not blank (to only fill when someone has filled in the servicenowid field.

hth,

Regards,

Shrini

0 Kudos
Accept as Solution Reply