6 Replies Latest reply on Dec 26, 2012 9:53 AM by BobGossom

    hide fields until they are needed for input...

    Nighthawk

      hi everybody...

       

      quick question in connection with the above... here is what i would like to achieve...

       

      i would like to hide fields until they are needed for input. when a delivery of the goods needs to be booked in or when something has been sold... then those relevant fields should be made visible... havn't done that for a long time... so i am fishing for solutions or a wordaround...

       

      any suggestion is much appreciated...

       

      regards from germay... and merry christmas...

       

      j

        • 1. Re: hide fields until they are needed for input...
          mcrostie

          Merry xmas from Australia

           

          My sugestion would be to script duplicate layouts with only the fields required shown

           

          Michael

          • 2. Re: hide fields until they are needed for input...
            Nighthawk

            hi michael...

             

            thanks for the suggestion... thought about that... is probably the way to go...

            so - merry christmas across the globe and thx again...

             

            jurgen

            • 3. Re: hide fields until they are needed for input...
              nickchapin

              Hi Jurgen:

               

              Depending on the number of fields and other design/scripting/business/etc circumstances, you could always use the "hidden tab" trick as well.

              • 4. Re: hide fields until they are needed for input...
                howardf

                Hi

                If all the fields are in the same area. You can put a portal over them with a filter on. If the filter is satisfied the portal disappears and the fields are visible and active.

                 

                Howard

                 

                Sent from my iPhone

                • 5. Re: hide fields until they are needed for input...
                  richardsrussell

                  Upstream in the workflow from this point, Event X occurs to trigger the need for these fields to become visible. You've suggested that Event X might be "when a delivery of the goods needs to be booked in" (presumably by entering a delivery date) or "when something has been sold" (presumably by entering a sale amount). Based on these presumptions, it looks like Event X is generally "something gets entered in a field". I suggest you set up that field with a script trigger that goes off when the field is not empty upon exit. The script it triggers would be a simple one, flipping a variable (let's call it "Visibility On") from 0 (the default entry for each newly created record) to 1. The effect of that variable will become apparent in this field, with container result:

                       Mask = If ( Visibility On; ""; F::White )

                  where "F" is a single-record table containing fields that apply to the file as a whole and "White" is a global container field containing a pure white color swatch.

                   

                  Format the "Mask" field to expand or contract to fill the space (NOT preserving original proportions) and place it over the fields you want hidden until revelation time. (If they are separated from each other on your layout, you may need more than one copy of the "Mask" field.)

                   

                  The drawbck to this approach is that it still lets the user tab into those initially hidden fields, even before they're revealed, except then the user won't have any idea what they are, because their labels will still be covered up, too. You may want to script the tab jumps as triggeraable scripts as well.

                  • 6. Re: hide fields until they are needed for input...
                    BobGossom

                    Hi,

                     

                    A variation on this is the "hidden portal trick" shown at the very first DevCon. We still use it extensively. If you have a one record portal, but there is no valid relationship, the whole portal and anything inside it "disappears". Note that what is inside doesn't have to be "related" records.

                     

                    The way I typically do it:

                    -Create a calc field that equals 1

                    -Create an [usually unstored] calc field that equals 1 only when your criteria are met

                    -Create a relationship, where the link in the "core" table is the unstored calc field and the new TO uses the "constant" 1 field.

                    -Create a one record portal based on this relationship.

                    -Put the target fields from the core table in the portal (NOT field chosen from accross the relationship) in the portal

                     

                    When the criteria is met, the unstored calc field becomes 1, the relationshp resolves, and the fields appear. Until then that section of the layout is completely blank,

                     

                    Two caveates:

                    -Depending on your calculation, you may need a Refresh (Flush cache join) to get the relationship to resolve. If necessary, this can be done with an on-exit script trigger.

                    -If you put a button in the portal, the cursor will still turn into a hand when they "roll" over it, but nothing will happen if they click it.