Is it a bug

HCF
New Member

I have this App-Formula:
Ifs(
And(
[Phase]=“Complete”,
IsBlank( [TimeCompleted] )
)
, Now()
)
But still the TimeCompleted is updated with a new value when saved and there is already a value in the TimeCompleted field.
Is it a bug?

Solved Solved
0 11 329
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Try:

If(
  And(
    ([Phase] = "Complete"),
    IsBlank([TimeCompleted])
  ),
  Now(),
  [TimeCompleted]
)

View solution in original post

11 REPLIES 11

Steve
Platinum 4
Platinum 4

It is a bug…in your expression.

…where?

IFS(
…ALL these statements are true:
…1: (The value of column ‘Phase’) is equal to (“Complete”)
…2: (The value of column ‘TimeCompleted’) is empty
…NOW())

Which is exactly what it should do, but it doesn’t.

What is the result if the condition is not met?

Hi, if the conditions are met then “Now()”, else nothing.

Then you shall either use an IF expression or declare a conditional FALSE statement within IFS.

IF(
    AND(
        [Phase]=“Complete”,
        ISBLANK([TimeCompleted])
    ),
    NOW(),
    ""
)

OR

IFS(
    AND(
        [Phase]=“Complete”,
        ISBLANK([TimeCompleted])
    ),NOW(),
    TRUE,""
)

OR

SWITCH(
    AND(
        [Phase]=“Complete”,
        ISBLANK([TimeCompleted])
    ),
    TRUE, NOW(),
    ""
)

IFS expression shall be used very wisely and logically when conditional rules are set within as IFS stops execution of the rest of the statements, when any one of the conditions eval to TRUE.

Thanks for pointing me in the right direction. I purposely used Ifs to stop execution when the And() expression is not True. When True it gives me Now(). When False nothing - is that not correct?

It also sounds like, to me, you should be using a ChangeTimestamp type column instead. Wouldn’t you agree @Steve and @LeventK?

Hello Dave,
Regarding what is required to achieve at the end, ChangeTimestamp type column could be used as well, I agree.

I don’t want to use the ChangeTimestamp type as this will trigger a change in the [TimeCompleted] even if the field already has a value.

Steve
Platinum 4
Platinum 4

Try:

If(
  And(
    ([Phase] = "Complete"),
    IsBlank([TimeCompleted])
  ),
  Now(),
  [TimeCompleted]
)

Thanks a lot (y)

Top Labels in this Space