Post

2 followers Follow
0
Avatar

if number field has a value show a number.

Hi,

 

I'm using two number fields and one calculation field. 

In my calculation field I would like to get a number 20 or 40 if one or both number fields are filled in. 

How can I translate this into a code that my calculation field will understand? 

by example:

number field A: has a value = calculation field: 20

number field A & B : has a value = calculation field: 40

kind regards,

Michaël Struelens

Please sign in to leave a comment.

2 comments

0
Avatar

Hello Michaël,

var a = @number field A;
var b = @number field B;

a != null && b != null ? 40 : a != null || b != null ? 20 : 0

Rainer

Rainer Grabowski 0 votes