cancel
Showing results for 
Search instead for 
Did you mean: 

Expected numeric/value expression

Former Member
0 Kudos

Hi experts,

I'm new in VC and have very strange problem:

When I'm trying to format fields or write IF expression, I'm getting an error "<b>Expected numeric/value expression"</b>.

For example, NSTR(@value,"9.2") or IF((ISNULL(@value1),@value2,@value3).

What is the problem?

Thanks in advance,

Inna

P.S.

We have EP7 SP11 and I'm trying to edit fields in <b>charts series</b>.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Inna,

You are getting this error because a numeric value is expected & your formula is returning some string values.

Make a try with this,

IF((ISNULL(@value1),INT(@value2),INT(@value3))

Regards,

Shemim

Former Member
0 Kudos

Thanks Marcel and Shemim,

I understood my mistake, I should always remember to transfer the value to the required type (for example, in charts it should be numeric).

So, I wrote: NVAL(IF(....)) and it works.

Thanks a lot for your help,

Inna

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Inna,

this error occurs, because you have the wrong data type as return value.

One example:

You have an expression box, which needs a boolean value then you use a formula like

IF((ISNULL(@value1),@value2,@value3)

@value2 or @value3 is not from the data type boolean.

You should use instead e.g.:

BOOL(IF((ISNULL(@value1),"false","true"))

Hope that helps.

Best Regards,

Marcel