Connecting Source Properties

You can connect a source property to an SQL parameter in much the same way you connect source and target properties. Typically, the source property you want to use contains a list of values that satisfies the needs of the SQL statement you are going to use. For example, to satisfy the needs of the {catname?} parameter, you want to display a list of product categories that the user can select from.

NOTE: Values that satisfy parameters set for UPDATE, INSERT, and DELETE statements cannot be connected. That is, values in list boxes, combo boxes, text boxes, trees, and so forth can be used to set parameters in SELECT statements, but not UPDATE, INSERT, or DELETE statements.

One way you can create such a list is to use an SQL statement that retrieves the type of data the parameterized statement is looking for and display it in a list box. For example, the following SELECT statement could be used to retrieve product categories:

SELECT `Product Sales for 2002'.CategoryName FROM `Product Sales for 2002' GROUP BY `Product Sales

for 2002'.CategoryName

After you configure a list box to use this statement as its data source, you can connect the list box's Selected Item property to the parameterized statement we are using. When this connection is completed, the user can select an item from the list box and view the sales figures for the selected product name, as the following figure shows:


NOTE: Although it is possible for an SQL statement to contain duplicate parameters (that is, two parameters with the same name), in the Proficy Portal client, you will not be able to use duplicate parameters when connecting properties to parameters. The two parameters will appear in the Parameter Connections dialog box; however, you will be able to select only one of the duplicate parameters.