Skip to main content
Answer

IS NUll formula is returning an error.

  • June 3, 2025
  • 1 reply
  • 48 views

Forum|alt.badge.img+3

Hi,

I am trying to handle null values in GI and giving this formula

=IIf(
  IsNull([DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a]) Or 
  [DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a] >= [DemandSalesW2.ARTran_Formulaa0b3cfd923094f969a59fb9fa0093818] And 
  [DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a] >= [DemandSalesW3.ARTran_Formula07567adb968540ba95a4e8dd42fa0655],

  [DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a],

  IIf(
    IsNull([DemandSalesW2.ARTran_Formulaa0b3cfd923094f969a59fb9fa0093818]) Or 
    [DemandSalesW2.ARTran_Formulaa0b3cfd923094f969a59fb9fa0093818] >= [DemandSalesW3.ARTran_Formula07567adb968540ba95a4e8dd42fa0655],

    [DemandSalesW2.ARTran_Formulaa0b3cfd923094f969a59fb9fa0093818],

    [DemandSalesW3.ARTran_Formula07567adb968540ba95a4e8dd42fa0655]
  )
)
This the GI is raising an error 
“Index was outside the bounds of the array”.
Can any one guide me whats wrong in the formula. I am trying to achive max values of 3 columns.

 

Best answer by lauraj46

Hi ​@tahayabali ,

The IsNull function takes two arguments: IsNull(value, nullValue)

If the value is Null then it returns nullValue.

Instead if IsNull, please try this:

iif([DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a]=null, …

Hope this helps!

Laura

1 reply

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • Answer
  • June 3, 2025

Hi ​@tahayabali ,

The IsNull function takes two arguments: IsNull(value, nullValue)

If the value is Null then it returns nullValue.

Instead if IsNull, please try this:

iif([DemandSalesW1.ARTran_Formula13bfa5591de24380bcd5cdb1f24fe59a]=null, …

Hope this helps!

Laura