7 Replies Latest reply on Sep 10, 2016 11:42 AM by FabriceNordmann

    Calculation based on tooltip

    sccardais

      Can Conditional formatting or Hide object be based on the presence or absence of a tooltip attached to a field?

       

      For example, if a field has a tooltip attached, change its color or show a tiny icon indicating that the field has a tooltip.

        • 1. Re: Calculation based on tooltip
          beverly

          since tooltips can be calculations, you might assign a $$var with LET

           

          Let (

          $$tt = "..." // or "?" or add appropriate Unicode 'font symbol' here

          ; "this is my tool tip"

          )

           

          Then place the $$tt Merge Variable over the field. size font on the object as placed or with TextSize() in the above assignment.

           

          Yes, this would be each tool tip for each field on the layout and maybe you need a different $$var for each field (or not).

           

          Might I ask why you would't just train your users to mouse-over to look for the ToolTip? Can you explain a little more on this topic?

          beverly

          • 2. Re: Calculation based on tooltip
            sccardais

            Thanks, Beverly.

             

            I’ll try your suggestion.

             

            As to “why”, I thought it would be better to indicate which fields have tooltips since some, but not all, fields have them. In this case, some fields don’t have tooltips and I wanted to prevent the minor irritation of waiting for a tooltip that isn’t there.

             

            If used consistently,  a tiny icon such as ? or ☝︎would eliminate confusion and wasted time.

             

            That’s my thinking, anyway.

             

            Thanks for your reply.

             

            Scott C

            • 3. Re: Calculation based on tooltip
              FabriceNordmann

              But the tooltip will be evaluated only onMouseOver, which means that you will know there is a tooltip after having read it. And you need to refresh the window or the object.

               

              why not do it the other way around?

              The conditional formatting formula would declare a global variable ($$) that the tooltip would use.

              Another approach would be to make both the tooltip and the conditional formatting depend on the same source. A good place would be the field comment.

              Tooltip: fieldcomment(get( filename ); getfieldname (self ))

              conditional formatting : not isempty ( FIeldcomment(get( filename ); getfieldname (self )))

              1 of 1 people found this helpful
              • 4. Re: Calculation based on tooltip
                beverly

                Fabrice is correct. The $$var is only set on mouseover and refresh needed.

                Testing (after breakfast) helped.

                 

                more ways to "set" this.

                 

                I also got to thinking that since the merge variable is placed where needed, why not just put the TEXT object (the ? or other UNICODE icon) instead on fields that have the tool tip?

                 

                beverly

                • 5. Re: Calculation based on tooltip
                  sccardais

                  Very helpful ideas. Thank you Beverly and Fabrice.

                   

                  I’ll update this post with results.

                  • 6. Re: Calculation based on tooltip
                    beverly

                    p.s. I said tooltips on fields, but I also put them on buttons and other objects.

                     

                    And an IDEA request might be handy to add to the conditionals. A function to test if a tooltip is set for the object, then

                    (if) not IsEmpty( ToolTipSet(self) ) // for example

                    underline // or something appropriate.

                     

                     

                    beverly

                    • 7. Re: Calculation based on tooltip
                      FabriceNordmann

                      I have to admit it was quite unfair, since breakfast time was already well past in my time zone