5 Replies Latest reply on Jul 10, 2014 4:36 PM by keywords

    Choose "slider" window

    jube

      So right now I count a transaction as a new record (be it a bill or a payment). Georgia_Victory_2014_and_2014_07_10_10_09_41_—_Evernote_Premium_and_Buddies_1.png What I'm trying to do is have the slider open in appropriate window based on whether or not the status for the transaction is listed as "Bill" (Bills_owed__on__Bill__status_.png) or "Payment" (Bills_owed_on_Payment_status.png). Is there an easy way to do this?

        • 1. Re: Choose "slider" window
          Stephen Huston

          Name each panel in the layout as named objects using the Inspector, at the top of the Position tab, and create a script to go to the object based on the value of the transaction-type field. [You can even name each of the panels to match the appropriate value in the transaction-type field, and then have the script simply Go to Object using the field value to specify the object name.]

           

          Then set a script trigger on the transaction-type field in the layout (Format>Set Script Triggers...), and set that script to run OnObjectModify.

           

          You may need to set an additional script trigger to run OnRecordLoad with the same script so that, as you change records, the correct panel appears for each.

          • 2. Re: Choose "slider" window
            Stephen Huston

            Another option comes to mind — one that requires no script/triggers:

             

            You can do the same thing without needing slider panels, using the Hide Object When (visibility) setting in the Inspector's Data panel, so only the correct items appear in that area after one of the status-type-values has been entered, depending on which value was chosen.

             

            Just the set the objects to Hide object when:

                 status_type_field ≠ "yourValueHere"

            • 3. Re: Choose "slider" window
              erolst

              Stephen Huston wrote:

               

              Name each panel in the layout as named objects […]

               

              Well, if this isn't a carbon copy of what I was about to post (then decided to do a last check …)

               

              Another option would be to use a Hide calculation for each of a set of two panels (or other container objects; or even the fields / portal themselves).

               

              EDIT: Stephen, you're fast!

              • 4. Re: Choose "slider" window
                Stephen Huston

                "Great minds run in the same ruts."

                • 5. Re: Choose "slider" window
                  keywords

                  Here is a variation on the above, similar to Stephen's second suggestion (hiding):

                   

                  Instead of using a slide control with two panels, create two slide controls each with a single panel. Then you can set one to hide when "bill" is selected and the other to hide when "payment" is selected. Finally, stack them one directly on top of the other. Bingo! that part of your layout changes on the click of your radio button.