cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Absolute values (ABS)

Former Member
0 Likes
10,107

Post Author: ivanl

CA Forum: Formula

Hi,

I have a field "type" that has positive and negative values. How do I ensure that the absolute value is extracted from database?

Thanks,

Ivan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Post Author: SKodidine

CA Forum: Formula

Yes. Try it and see.

Former Member
0 Likes

Post Author: ivanl

CA Forum: Formula

thanks for the reply.

Would this work?

if {table.field 1} = "max"

then abs ({table.field 2})

table field 2 is the $ value of associated products (account types) in table field 1.

Former Member
0 Likes

Post Author: SKodidine

CA Forum: Formula

In CR XI you can use ABS function such as:

abs({table.field});

From CR XI help:

Action

Abs (x) returns the absolute value of x.

Examples

Abs(1.50)

Returns 1.50.

Abs(-1.50)

Returns 1.50.

Abs(10 - 7)

Returns 3.