151529 - no subject - Hi,\n\nAnybody has a clue as to why, whe

Hi,

Anybody has a clue as to why, when used for a task report column, the expression below blanks all column values?

if(isnull(pv!avgResponseTime), Completion(), todecimal(Completion()) - todecimal(pv!avgResponseTime[1]))

Changing the expression to

if(isnull(pv!avgResponseTime), Completion(), todecimal(1) - todecimal(pv!avgResponseTime[1]))

Gives the correct results. Thanks.

OriginalPostID-151529

  Discussion posts and replies are publicly visible

Parents
  • charlesb The problem is being seen when the todecimal(pv!avgResponseTime[1])) is evaluating to null. Completion() is working perfectly as per my observations. Control the null valued array variable by making use of index function.

    I believe the following expression should solve the issue:

    if(
    length(
    pv!avgResponseTime
    ) = 0,
    Completion(),
    todecimal(
    Completion()
    ) - todecimal(
    index(
    pv!avgResponseTime,
    1,
    0
    )
    )
    )
Reply
  • charlesb The problem is being seen when the todecimal(pv!avgResponseTime[1])) is evaluating to null. Completion() is working perfectly as per my observations. Control the null valued array variable by making use of index function.

    I believe the following expression should solve the issue:

    if(
    length(
    pv!avgResponseTime
    ) = 0,
    Completion(),
    todecimal(
    Completion()
    ) - todecimal(
    index(
    pv!avgResponseTime,
    1,
    0
    )
    )
    )
Children
No Data