Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Please help me correct a formula

$
0
0

Replies: 2

Hi,

Please may you help me.

I have created the following formula in fieldname29:

(function(){
var result = 0;
if(fieldname9 == ‘A Seat’){
if(fieldname8 == ‘Hawker HS800xp (8 Seater)’) result = 1;
if(fieldname9 == ‘A Seat’){
if(fieldname8 == ‘Challenger CL604 (10 Seater)’)
result = 2;
if(fieldname9 == ‘A Seat’){
if(fieldname8 == ‘Gulfstream G350 (14 Seater)’) result = 3;
}
return result;
})()

What I would like to achieve with the formula is,

if a user chooses a Hawker (fieldname8) and then chooses a Seat (fieldname9), it will give or result in fieldname12.

if a user chooses a Challenger (fieldname8) and then chooses a Seat (fieldname9), it will give or result in fieldname23.

if a user chooses a Gulfstream (fieldname8) and then chooses a seat (fieldname9), it will give or result in fieldname26.

Thank you,


Viewing all articles
Browse latest Browse all 59525

Trending Articles