logo

NJP

How to Dynamically Set Default Value on Date Field | ServiceNow Tutorial

Import · Apr 26, 2023 · video

foreign [Music] my name is salooni and I am a technical consultant here at blackfest in this demo I am going to show how to dynamically set default value on the date type field let's take a scenario an organization would like to set due date on the problem task from 30 days of the problem record creation to configure that I'm gonna navigate to problem first let's take any problem for now um let's go ahead and click new on the problem task related tab click on root cause analysis and we have a due date which is a date time that I failed so I'm gonna right click on the due date field and click configure dictionary in the configure dictionary we are gonna go ahead and set the default value so for setting of the default value we are not gonna go directly here and set the default value we are gonna do the dictionary overwrite so click on new let's select the table problem task we would like to overwrite the default value and in the default value we are gonna use the JavaScript rate GS dot this I go and minus 30. so this this line of code will basically set the due date to 30 days from the problem task creation I'm gonna go ahead and submit let's go back to the problem task and let's click on new now and would cause analysis and here we go the due date is set to four weeks from the problem task creation meaning 30 days from now that is all for today thank you so much for watching foreign

View original source

https://www.youtube.com/watch?v=r8jwPJdz5iU