HI all,
I have created a form that logs service calls. After filling out the reporting person's name, a current date and time is generated. The problem is that the next time I open this file, the date defaults to the current one. I would like to know how to commit the date when the form is saved, so it does not auto update next time I open the form. Any help is greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Locking only stops the user from changing the field ....programs can still touch them. Yes you can send me the form .....include a description of the issue as the forum and the email are not tied together and I get easily confused as to which one goes with what. You can send it to LiveCycle8@gmail.com
Paul
Views
Replies
Total Likes
You could wrap your calculation in a test to see if there is not a value in the field. If there is then do not do the calculation. Something like this:
if (this.rawValue == null){
put date calculation here
}
Here is my Formcalc
script on the calculate event. It works perfectly, however, when re opening the document , the date is changed to the current date and time. I would like for it to remain unchanged. How do I go about converting the script below to Javascript so I can use the suggestion you gave above? Tahnsk for your help.
if
(Row1.Cell8 <> null )
then
Concat(Num2Date(Date(), "MMMM DD, YYYY"), " ", Num2Time(Time(), "HH:MM"))
else
null
endif
Views
Replies
Total Likes
There is nothing wrong with that script except that you are saying if the form is NOT equal to null (meaning it is populated) then set the date...I think you want to test if it IS equal to null (==) then that means it is empty and you want to set the date. Also ....did you chose the calculate event for a specific reason?
paul
The date field is populated when Cell8, which contains name is populated. I wanted it to be empty until a name is filled in. That is why I have it as null. I am trying to figure out how to convert the code you gave me above to formcalc so I can add it to my own, or how to change my formalc sript to Javascript so I can have both on the calculate event of the date/time field. Thanks for you help.
Views
Replies
Total Likes
My code in FormCalc woudl be:
if ($.rawValue == null) then
put date calculation here
endif
Paul
Views
Replies
Total Likes
Actually I would like the date to be input, only if the name has been entered in cell8, if the name has not been enterd I would like for
it to remain blank. my formcalc takes care of this, but where I have a problem is tahat on reopening the doc, I would like for this date not to be changed to the current one. I have experimented with a lock script for all fields that is run on presave, and though it locks the other fields it does not lock the date field, and it keeps getting updated every time the form is reopened. My other option is to have the date manually entered, but this leaves room for manipulation. Is there a way I could lock the value in the date field? any help is appreciated.
Views
Replies
Total Likes
So we can check to see if there is anything in the field and set the date but how will we know if this is the 1st time opening or the next time. We could set a flag (a hidden field) that we can check instead of the field. We coudl set the flag on the exit of the field so if the flag is set then we know that the field has been set. So we woudl test to see if the flag was set (tells us if this is the 1st time opening), if yes and there is data in th efield then do not set the time.
Make sense?
Paul
Views
Replies
Total Likes
Yes, this makes a lot of sense, The problem is how do I go about setting it, and on what event should it be set. I originally thought of locking all date fields with a value on save, but it doesnt seem to work on reopening the form eventhough the locking takes place. I guess on re-opening the doc it runs the calculate again even though the fields are locked. Can I pm you the form so you can see how I have it as I cannot upload it here? Since I guess Im new that option is not available.
Views
Replies
Total Likes
Locking only stops the user from changing the field ....programs can still touch them. Yes you can send me the form .....include a description of the issue as the forum and the email are not tied together and I get easily confused as to which one goes with what. You can send it to LiveCycle8@gmail.com
Paul
Views
Replies
Total Likes
HI Paul,
Tahnks for your help so far. I have attached the form. I want to be able to
have the date field hold the original value entered, and not to change
everytime the form is opened. Here is the issue as I outlined in the Forum:
How to make a calculated date unchangeable after save/
submit<http://forums.adobe.com/message/2680289#2680289>
HI all,
I have created a form that logs service calls. After filling out the
reporting person's name, a current date and time is generated. The problem
is that the next time I open this file, the date defaults to the current
one. I would like to know how to commit the date when the form is saved, so
it does not auto update next time I open the form. Any help is greatly
appreciated.
Views
Replies
Total Likes
Just sent the form. Thank you sooo much for your help so far.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies