Expression Incompatible expression types:Decimal, String

0
If the condition is not met using if, I want to output 0 or blank. However, the above error occurs. Is there any way to fix this error?
asked
3 answers
1

Hi,

 

$currentObject/Performance_Plan_ProductionQuantity else 0

 

By putting the 0 in between '0' it is a string. To remove the entry, you can use the word empty without quotes.

 

Go Make It

answered
1

The full if statement will be:

if($currentObject/P_P_Quantity != empty)
then $currentObject/P_P_Quantity
else 0

 

answered
1

Same as here?

 

Best,

Holger

answered
1

Hi bosung kim,

if your attribute type is decimal where you are storing this logic then use this one

if $NewEntity/Plan_StartDate >= $NewEntity/Plan_StartDate and$NewEntity/Planned_EndDate <= $NewEntity/Planned_EndDate then$NewEntity/Performance_Plan_ProductionQuantity else 0

 

and if your attribute type is string  where you are storing this logic then use this one

if $NewEntity/Plan_StartDate >= $NewEntity/Plan_StartDate and$NewEntity/Planned_EndDate <= $NewEntity/Planned_EndDate then$NewEntity/Performance_Plan_ProductionQuantity else toString(0)

 

answered