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
BedrockMission!

Learn More

View all

Sign in to view all badges

Live Cycle Designer Javascript Help

Avatar

Avatar
Level 1
garyc88386627
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
garyc88386627
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
garyc88386627
Level 1

31-10-2017

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)

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
mouslander
Level 4

Likes

23 likes

Total Posts

298 posts

Correct Reply

27 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
mouslander
Level 4

31-10-2017

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