Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Locking a calculated date field

Avatar

05-02-2009

I have a date field on my form using the custom current date object included in Designer 8.2, which applies the following FormCalc script to the LayoutReady event of the field:



// Current Date in short-style date format.



$.rawValue = num2date(date(), DateFmt(1))



My problem is this: the date is set when the user fills out the form, as expected. However, whenever the form is subsequently opened, the date is updated to the current date. I need to have the field set initially when the user fills out and submits the form, and then make it static so that future reviews of the form show the initial date. I know this is probably something very simple, but I am missing it. Any suggestions?



Thanks in advance,

Angie

Replies

Avatar

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct Reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 8
Jono_Moore
Level 8

Likes

111 likes

Total Posts

1,151 posts

Correct Reply

144 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
Jono_Moore
Level 8

05-02-2009

I found this script the other day that seems to do the trick:



if ($.rawValue==null)then

$.rawValue = [put your script here]

else $.rawValue

endif