6 Replies Latest reply on Apr 11, 2013 6:38 PM by MarkNZ

    Conditional Formatting a Button


      Hi All,

      What would the scripting look like to change the wording from "Telemarketer" to "Committed Record TM" using the right handside button.

      PS: the righthand side button once selected copies the record from one Table to another. & is this all done under the condioning formating dialog's.....Regards


        • 1. Re: Conditional Formatting a Button

          Hi Mark,


          If you want the text on a button to change, there are two options that I can think of first up:


          1) You can make the button label text a Merge Field. That way, the actual text can be a field value or a global ($$) variable.

          2) You can use conditional formatting, with two labels with different text, and opposite calculations so that only one is visible at any one time.


          It looks like you're in FM12, with gradients on the buttons so the first option is likely to give better-looking results (unless there is a way to make the text colour "transparent").





          1 of 1 people found this helpful
          • 2. Re: Conditional Formatting a Button

            This sounds like a further extension of your data transfer issue which you posted recently.


            I suggest you create a field which is set when the record is committed to the other table, then display that field as a merge on your button. If you want the button itself to change appearance you can do that with conditional formatting.


            A couple of other points, though:


            1.     If you do this you will need to build into the script a means of preventing the record being committed a second time. A check loop at the start of the script woulkd do it, along the lines of—


            If [ checkField = "Committed Record TM" ]

                Exit Script []

            End If


            2.     If you want the text to look different (eg. colour) you can use the TextColor function to change the colour if you wish, such as—


            Set Field [ table::checkField ; TextColor ( "Committed Record TM" ; RGB ( 255 ; 0 ; 0 ) ) ]



            • 3. Re: Conditional Formatting a Button

              Hi keywords,

              Thanks for your suggestions...yes Im still working through things on this issue..but getting there which is great.

              Can you guide me with your suggestion "create a field which is set when the record is committed" How does setting the field happen? its obviously takes place with the button is clicked.


              Good point about the button being clicked twice...so thanks

              • 4. Re: Conditional Formatting a Button

                Hi Rob,

                Thanks for your suggestions..Just so you know the Committed Record TM field as it stands has a Value List attached. Because I use this field to sort records.

                So what im trying to achieve in the main is have the above field auto change when the "Commit Record' button is clicked.


                Also when a new record is created I have the Auto Enter set up on the field to insert the word "Telemarketer"

                • 5. Re: Conditional Formatting a Button

                  OK, here is a new version of that sample file.

                  • 6. Re: Conditional Formatting a Button

                    Thats great keywords,

                    Now I undestand it alot better..so thanks.

                    Might have to shout you morning tea soon...