3 Replies Latest reply on Sep 4, 2016 4:01 AM by ndveitch

    Script Trigger or Button or Button Bar?

    ndveitch

      Hi There,

       

      I want to ask a question regarding script triggers vs buttons or button bar. I have a layout where I have 7 fields that hide if there is no check mark in the field. Then I attached an OnObjectEnter trigger to go to the required layout. For example, if Clients is selected, then go to the clients section and so on. I did this a few months ago, and it is working nicely. Now my client needs an extra section added so I am revising the layout and wonder if it might be better to rather turn the fields into buttons, seeing as all they do is go to the required layouts? Which would be the better option or is it just a matter of personal preference? 

       

      This also brings me to button bars. If buttons might be a better option then would it make sense to rather use a button bar? I have been looking into button bars and one thing about it that I like is that it is easier to get the buttons looking right and positioned properly without having to group buttons together.

        • 1. Re: Script Trigger or Button or Button Bar?
          PeterWindle

          My thoughts:

          A field is for data, putting it in and getting it out. Having to create a field to perform a button task is a lot of overhead and can be confusing when importing/exporting.

          A button/button bar is for performing functions. No overhead in the database schema ..

           

          If you want to get snazzy, button labels can be determined by calcs, making them more dynamic.

          • 2. Re: Script Trigger or Button or Button Bar?
            ndveitch

            So for my solution it might be better to take the fields off the layout and replace them with buttons then, because the only reason they are on the layout is to show a tick mark if the module is open for that record. I could instead use the field name as the label for the button, and then just attach the script to the button, instead of attaching it to the OnObjectEnter.

            • 3. Re: Script Trigger or Button or Button Bar?
              ndveitch

              Ok i have been playing around with the button bar for awhile now, and I think for my scenario using the script triggers seems to work better as I have a bit more control over how the check mark is displayed.

               

              To give more info, might make more sense. I have a contacts module that shows if a contact is a client, a supplier, an employee, committee member and so on. One contact can fall into a number of different roles. So I created the various modules with the unique attributes for the various sections, then for all the contact info that is the same in each table, I have put those into a contact table. Then I created a check field for each foreign key field that is blank if empty or a tick mark if the key field had data, "... Case ( not IsEmpty ( _fk_StaffID ) ; "✓" ; "" ) ...". This works well for displaying on the contacts list view, I can hide the field if empty, and for the fields that have the tick mark, I can set styles as needed.

               

              I am finding it a bit of a challenge to get the same visual effects using the button bar.