1 Reply Latest reply on Apr 2, 2012 8:55 AM by philmodjunk

    How to create a "If This" then "This" form...

    BradWieland

      Title

      How to create a "If This" then "This" form...

      Post

      How do I create a "If this" then "This" form? For instance, if I have the following product categories: Doors, Cabinets, Accessories. If my client is entering a new "Door" product, I want them to go to a certain layout with "Door" features and options only. The same for "Cabinets", etc.

        • 1. Re: How to create a "If This" then "This" form...
          philmodjunk

          To do exactly what you say, you can set a script trigger on the field where they select the type of product. The script can check the value of this field and change to the layout appropriate for that product category.

          If [YourTable::ProductType = "Door" ]
             Go to layout [Doors]
          Else IF [ YourTable::ProductType = "cabinets" ]
              Go to Layout [Cabinets]
          // and so forth

          If you name your layouts exactly the same as the values in a value list where the user selects the product type, you might be able to use just a single go to layout step with the "layout name by calculation" option specifying your value list formatted field of product types.

          An alternative you might want to explore (depends on the structure of your database as to whether this is easy to do or not), is to set up a tab control where each panel in the tab control contains the needed fields, buttons, etc. for that product category.

          It's also possible to put a navigation bar of buttons on your layout where you have a button for each product type. The button then changes layouts to select the appropriate layout for the type of product named in the button's label.