Forum Discussion

WillVitale's avatar
WillVitale
Contributor
8 months ago

Cell Value Showing "OK"

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

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

     

  • manthangandhi's avatar
    manthangandhi
    New Contributor III

    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

    • WillVitale's avatar
      WillVitale
      Contributor

      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.

      • JackLacava's avatar
        JackLacava
        Honored Contributor

        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

         

  • Krishna's avatar
    Krishna
    Valued Contributor

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