Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

PDF form Week ending date auto populate

Avatar

Level 1

i have a pdf form i am doing. it has a java script to make the week ending date populate other fields and minus a day.

if (WEEK_ENDING.rawValue == null)

{$.rawValue = "";}

else

{Num2Date(Date2Num(WEEK_ENDING.formattedValue, DateFmt(1)) - 0, DateFmt(1));}

endif

this works for the first date, but when i change it to

if (WEEK_ENDING.rawValue == null)

{$.rawValue = "";}

else

{Num2Date(Date2Num(WEEK_ENDING.formattedValue, DateFmt(1)) - 1, DateFmt(1));}

endif

it does not work. any idea what i am doing wrong?

Tina

4 Replies

Avatar

Level 10

Hi Tina,

Well at first look, seems like you mixed FormCalc and JavaScript together...

Num2Date and Date2Num can only be used in FormCalc, and you can't use these { } in FormCalc

You should be using the if (), then, else, elseif, endif for FormCalc

Avatar

Level 1

the formula does not want to work without the {} it gives me a syntax error 3: at line 4

Avatar

Level 10

Are you sure you are in FormCalc and not JavaScript?

Avatar

Level 1

i am doing this in a Acrobat PDF form. when I asked on the forum there they told me i needed to ask on this forum. am am trying to use Java script in the form. should i still be on the Adobe forum?