Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Live Cycle Designer Javascript Help

Avatar

Level 1

I'm redoing a MS Document to LCD. Need help redoing the MS Doc Script below to LCD Java Script for my form. Using Java Script or FormCal. whichever will do the calculations. Here is the script below. I'm not an experience Java Script user.

=If((Nights<2),0.75*(Nights+1)*PerDiemMeals,(Nights+0.5)*PerDiemMeals)

1 Reply

Avatar

Level 7

It is hard for me to determine the script based on the MS Word calculation.

I believe you want something like:

if(nights < 2){

perDiemMeals = nights * .75

}

in the sample above there would be the assumption that there is a field called "nights" and a field where the calculation would go called perDiemMeals