2 Replies Latest reply on May 31, 2013 9:46 AM by DaleLong

    Boolean Toggle Icon in Find Mode

    DaleLong

      I have some layouts where I've implemented an icon for toggling a boolean field. My implementation is to place on the layout an unstored calc field, called z_button_publish, with calculation

       

      Case ( Reagent::status = 1 ; Graphics::%CHECK_24 ; Reagent::status = 0 ; "" )

       

      Where Reagent::status references the boolean, and Graphics::%CHECK_24 is a global container with a checkmark graphic.

       

      This field object is set to perform a script on click, which simply sets the Reagent::status field to not Reagent::status, which effectively toggles the value between 0 and 1, which forces the graphic in this unstored calc to update to a check mark when it is 1.

       

      This is all fine and good in browse mode. However, the problem is, when you go into Find mode, the current setup does not allow you to search on this status field, since it is not directly displayed, and even if it were displayed, it would make for a pretty ugly presentation.

       

      One option would be to use a checkbox set which is set to the status field, sized to only show the '1' option, with the same boolean toggling script attached. But I rather like the checkmark graphic which is available in Browse mode, it looks a bit more polished than showing the default graphics of checkboxes and radio buttons. The ideal behavior would be you could essentially toggle this graphic icon and the referenced status field by clicking on the icon in Find mode the same way you do in Browse mode. But I'm at a loss as to how I would go about doing that. Is there a way to implement this sort of behavior?

       

      Thanks in advance for any advice!