tomas

Simple if statement

Discussion created by tomas on Feb 28, 2012
Latest reply on Feb 28, 2012 by comment

Hi,

I am trying to script a simple if else loop to generate a fee to be paid by customers.

It should do the following:

They are in group 1, 2, 3, 4 etc depending on this they should pay a fee of 50, 60, 70, 80 and so on.

Ho do I write an if else loop that would do this, I am really new to this and I can only come up with this:

 

fee = If ( group = "1"; 50; 60 )

 

What I really want is to be able to use a table

 

Group
Fee

1

50
260
370
480
590
6100
7110
8120
9130
10140
11150
12160
13170
14180
15190
16200

 

I have created a value list with the group number (this list is very very long). Depending on the group the fee field should just automatically be filled in with the corresponding fee rate.

Can you think of a better way of doing this, because creating a script with if 1 then 50 uf 2 then 60 for a list of hundreds of rows will be annoying.

 

Thanks

/tomas

Outcomes