6 Replies Latest reply on Sep 1, 2015 10:29 PM by Fred(CH)

    Tab order

    mblogsd

      Forgive me if there has been an answer to this before, but my searches have yielded no solid results for what I'm attempting to do.  I'm wondering if it's possible for the tab order of fields to be altered based on the content in the field.  To be more clear, I have a layout that pulls values from another table of lookup values.  This is in regards to tracking data for wastewater treatment operations.  For smaller package plants, the footprint and equipment can be different.  This is the reason for the lookups; to provide an N/A in the necessary fields that said client does not have that particular piece of equipment so you don't go looking for it.  When setting up the tab order, we want to include all fields as some clients may use all of them.  Is it possible to write a script (or any other method) that would skip fields in the tab order that have N/A in them as you tab through the layout and stop on the ones that are blank so you can enter data?  Right now, it's setup to hide these fields if they are N/A.  Not an ideal setup, but works for now.  If the answer is this is currently not possible, that's ok too, but would like to attempt this if it is.  Thanks for any help in advance.

        • 1. Re: Tab order
          mikebeargie

          you could use an OnObjectEnter script trigger, using something like Get(ActiveFieldContents) to check for the "N/A" value, and redirect using the "Go To Next Field" script step if the value is matched.

          • 2. Re: Tab order
            mblogsd

            Thanks for the suggestion, Mike.  Might be a tall order, but is there any way you might know that I could apply this to the layout rather than each individual field?  By all means, that looks like it would work, but is a lot of fields to go through and setup a trigger for.  I really do appreciate the suggestion, and will start looking into setting that up as in my mind, it seems like a layout-wide script might not be an option.

            • 3. Re: Tab order
              electon

              Actually I think that what you're doing at the moment is not that bad.

              Probably the annoying thing here is that those fields disappear.

              What I would do is create a text object that would look exactly as your lookup field with N/A in it.

              Stack your lookup fields on top of that ( make sure the lookup field has no transparency so it will cover the object below ).

               

              The tabbing will work and it will look like the original.

              • 4. Re: Tab order
                mikebeargie

                not really, the only close trigger would be onLayoutKeystroke, but you're not guaranteed a keystroke action when clicking in towards a field.

                 

                field level script triggers will give you the most control, but as noted, hiding object and even stacking/hiding objects may give you the best interface.

                • 5. Re: Tab order
                  mblogsd

                  Thanks, Mike and electon.  I'll give both of these a shot and see what plays out best.  I appreciate the input.

                  • 6. Re: Tab order
                    Fred(CH)

                    By all means, that looks like it would work, but is a lot of fields to go through and setup a trigger for.  I really do appreciate the suggestion, and will start looking into setting that up as in my mind, it seems like a layout-wide script might not be an option.

                    I have now took the policy to attach all triggers on all fields. They are all same generic scripts, one by event, all tables and fields have the same.

                     

                    Thus, specific Field Name, Field Type, Layout Names, Modes etc...- behaviors are properly ruled in a centralized script.

                     

                    In that system, a suggestion like Mike's one would very easy to achieve.

                     

                    About the N/A, did you think about the v14 placeholders ?