Skip to main content
April 23, 2024
Solved

Cell Value Showing "OK"

  • April 23, 2024
  • 3 replies
  • 0 views

Hello,

I was wondering if it's possible to have a check figure if the amount equals 0 that it displays "OK" and if it doesn't it says "Check Details". I've tried conditional formatting when the cell amount = 0 then "OK", but I figured I'm missing something or this might just not be possible.

Thanks,

Will

Best answer by JackLacava

Hi Jack,

I understand what you're saying, but the formula I have is a GetDataCell calc subtracting from a some accounts. Does that still work?


WillVitale_0-1713982828888.png

Will


Yes, but in the U8 you would have to recalculate that Total value, because dynamic calcs don't know anything about columns.

 

3 replies

April 24, 2024

Hi Will,

assuming your formatting is correct, I think you probably might need to check the View for that particular cell where you are trying to apply the conditional formatting, since the output you are expecting is in text format and not numeric you should be using V#Annotation. Please apply this view in the cell intersection and check with the conditional formatting you have already applied.

thanks

April 24, 2024

Hello,

No, annotation is not what I want. I have my column currently doing a calculation to determine if the cell is 0 or not. I was just wondering like in excel if you do like If(cell x=0,"OK","Check Details"). Something like that.

April 24, 2024

The point parent was trying to make is that the column might have to be configured as supporting text, which would happen if you point it to V#Annotation (regardless of what the formula does).

To be honest, the best way to approach these problems is typically to build a little U8 DynamicCalc formula that will do the calculations and return "OK"/"Check" (ideally for a text-supporting view like Annotation).

Rough outline of such a U8 off the top of my head:

if api.View.isAnnotationType then
    ' example check
    if api.Data.GetDataCell("A#Something - A#SomethingElse") = 0 then
       return "OK"
    else 
       return "Check Details"
    end if
end if

You'd then point the column at U8#MyNewMember:V#Annotation to display the generated values.

Depending on the use case, it might also be enough to simply highlight "check details" rows with Conditional Formatting and be done with it:

If CellAmount > 0 then
   BackgroundColor = Red
   TextColor = White
End if

 

April 24, 2024

WillVitale  - You can also try cell status in the conditional formatting. Example - CellStorageType 

February 9, 2025

Hey Will,

You can accomplish what you are looking for largely through number format imposed on the target row or column.

Remember that number format has POSITIVE;ZERO;NEGATIVE format handling in both Data Explorer and Excel.

Try using the above as your number format -- this means that you are looking for:

[Check Details];[OK;][Check Details]

This will return "OK" if zero and "Check Details" for all others.  One last note of caution, small decimals that round to zero are also regarded as zero in the above format so ensure your Validation Member formula accounts for this.  For example, multiply by 100.

Recognize this is a #Hack but probably gets you to what you are looking for without having to use UD8 and calculate.

 

Cheers,

A.