Reputation: 464
I want to create a calculated column that returns YES if the four columns beside it are not null and NO if they are all null. An example would be this:
Calculated Column| Column 1 | Column 2 | Column 3 | Column 4 |
YES | 10 | 5 | 3 | 2 |
YES | | 3 | | |
NO | | | | |
I'm not sure how to compare values in the same row though. If I check for something like "Column1 = '' " it check the whole column, rather than just the individual row.
Upvotes: 0
Views: 345
Reputation: 14628
Are you using the "programmatic name" property of the columns to refer to them in your formula? If so, have you changed them from the default values of $1, $2, $3, etc? You actually can't use these default values in Notes formula language.
Note that as suggested in Ken's answer, it's also possible (and frankly, much more common) to refer to the field names from the underlying document in your formula, rather than the programmatic names of columns. If your colunns 1 thru 4 are also calculated, however, using the programmatic names is reasonable.
Upvotes: 2
Reputation: 22266
I think you have the correct idea. In your calculated column, you can check the values of columns 1 - 4. The check will be performed for each row.
So assuming you had fields 1 through 4 that were the formulas for columns 1 through 4, your calculated column would look like this:
@If(@Length(field1 + field2 + field3 + field4) > 0; "YES"; "NO");
Upvotes: 2