How to use a database field in an If/Then equation
Want to be able to use a database field as the logic in an IF/Then statement?
Databases are stored as the database name AND a unique database ID number. If you are using a database field in a calculation you need to split out the database ID
To use a Database field in an if/then equation you first need to take just the name of the field by using a "split" function
To use the database result as part of an If/Then calculation just ensure you write your equation correctly
e.g If (splitlast(Activity, "|")= "Hills", Load, -1)
This means the calculation will firstly split the database result from the Activity field. Then, if the database field is called "Hills", it will return the duration entered into the Load field (as shown in the image below), otherwise it will return 0.
0 Comments
Add your comment