How to default a text box to display current year

anjiadmin
Tera Expert

How to default a text box to display current year.

Thanks,

Anji

11 REPLIES 11

I like this, I was thinking, SNOW could have provided a dynamic expression for default value. Glad to see this.



One issue is, it's displaying the value as "2,016". How to remove comma from this?


What type of field is it?   By the looks of it, I'm thinking it is an Integer?   They are automatically formatted.   You should probably change it to a String.


Thank you Jim.


It is working.



Thanks,


Y Anji


That's good.   Please remember to mark the appropriate response as being "Correct".   Thanks


Ram,



Use .replace(/,/g,'');


javascript:(new Date().getFullYear()).toString().substr(0,4).replace(/,/g,'');