In a previous Tech Tuesday article, we discussed how to add restrictions to lookups on forms and windows. This article will discuss how to apply this to fields on a detail window or a detail form. This is currently only available in our latest Extender 2016 version (build 16.00.0030 or higher). In this example, we have Extender forms where we wish to build our lists, and then have a field in the detail window restricted based on the value set in another field on the detail window.  We also have a form called Type Coding, with multiple Types defined:

We then have a form called Category Coding, this sets up several categories per Type create above.

If we click the lookup on the Category field, you will see we have created several categories, and have named them to show how the restrictions work.

Now that we have our data setup to be able to apply restrictions we will show you the window we are using these lookups on. Here is the window where we setup the restrictions. To show these restrictions work in the header and the detail of windows, we have set up the fields type and category (lower case) in the header and Type and Category (upper case 1st letter) to distinguish how these are setup. In the screenshot below, we have set the Type on the line to a B and clicked the lookup for Category as shown in the black box in the screenshot. This limited the look up values to only the categories where the type of those categories was a B.

We have set up the category look up to limit its values where the type of the category is equal to the value it the type (lower case) for the lookup. Let us show you how each of these is defined. As we have discussed how to set up the restrictions on the header fields in a previous article we will focus on how to do this at the detail level in this article.  Within Extender open your window that has details, click the Options button to open the window where you define the Scrolling Grid.

Double click the Category field which is defined as a lookup, and click the restrictions button.

Then click the Add Button to open the Add Restriction window. We will select Type Equals Field and select Type again.  This will restrict the list of Category values to only show the categories where the Type of the Category is the Type selected in the detail window. In previous versions of Extender, the list of fields from the detail window would not show in the list of fields in the restriction value drop down.

Once this is defined and saved you can see the restrictions work in the window as shown below.

As a happy addition, you can also zoom from these detail windows to the forms for the categories. This is available in Extender 2016 (build 16.00.0030 or higher)


Happy Coding!