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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

PDF form Week ending date auto populate

Traylv
Level 1
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
Magus069
Level 10
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

Traylv
Level 1
Level 1

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

Magus069
Level 10
Level 10

Are you sure you are in FormCalc and not JavaScript?

Traylv
Level 1
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?