Hi all, I am new to Live Cycle and fairly new to scripting so I am hoping this is just a stupid noob question.
Here we go. I have a form that has a job ticket number that is generated with the the following code:
$ = concat(Num2Date(Date(), "YY-JJJ-"), Num2Time(Time(), "KKMMS"))
That part works good and honestly without this site I dont think i could have gotten this far.
What I need is for that particular field to be locked or remain the same after the user prints or saves as. So when it is pulled up at a later date the ticket number will be the same. Hope that all makes sense.
Thanks in advance.
if ($ == null) then
$ = concat(Num2Date(Date(), "YY-JJJ-"), Num2Time(Time(), "KKMMS"))
endif
This if-statement will check that the current value is null (empty) and only then generate the ticket number. After the first time, the value is not null (it contains the ticket number) and the ticket number is not generated.
(if that doesn't work, try with $.isEmpty inside the if-statement)