Home > Databases > Edit Data > Expression Sets

Expression Sets

The Expression Sets command allows you to collect together several Define Field by Expression or Define Field by Table library entries and run them in quick succession. The collection can then be saved in the Expression Set library and rerun or revised in the future.

Name may be any descriptive phrase, including spaces, under which to save this Expression Set.

The Expressions to run parameter lists the selected expressions, if any, in the order in which they will be run.

Click the New button to create a Define Field by Expression or Define Field by Table library entry. The new expression will appear among your selections when you return to the Expression Sets dialog box.

Click the Add/Omit button to enter the Add/Omit Expressions dialog box, in which you may select existing Define Field by Expression or Define Field by Table library entries or cancel a selection previously made.

The Add/Omit Expressions dialog box lists all Define Field by Expression and Define Field by Table library entries that are either in the current Project or referenced by this Expression Set. If any library entries have been previously selected, the Order column will show the execution order of the currently selected Expressions and Tables. Click the names of any previously unselected list items (shown under the Select items to include parameter) that you wish to include in the Expression Set (ProVal will check them off). To remove a previous selection, uncheck the entries you do not wish to include in your Expression Set. Note that by changing the setting of the List parameter at the bottom of the Add/Omit Expressions dialog box, you may have ProVal show only Define Field by Expression or only Define Field by Table library entries in the list of items available for inclusion. When you have completed your selection of expressions to include, click OK to return to the Expression Sets dialog box.

To edit a Define Field by Expression or Define Field by Table entry, double-click the entry or select an entry and click the Edit button, and complete the parameters in the next dialog box (Expression dialog box or Define Field by Table dialog box, respectively). To change the order of expressions, click the Re-order button and complete the parameters in the next dialog box (Re-order Expression Set dialog box).

The Re-order Expression Set dialog box lists all the expressions currently included in your Expression Set. To change the order of execution of the expressions, enter revised values in the Order column. For example, to run “Expression A” first, enter “1” in the Order column of its row. “Expression A” will then jump to the top of the list, with the remaining expressions following in line after it. Continue this re-ordering process until the desired order is achieved. Then click OK to return to the Expression Sets dialog box.

Click the Historical Data button to allow expressions to refer to data in databases other than the currently open database (presumably containing current year data). When the Allow expressions to refer to historical databases box is checked, you can specify any number of databases along with prefixes. You must also specify the Key field(s) used to match current and historical data records (i.e., prior year data). The Define Field by Expression and Define Field by Table library entries can then contain Expressions and Selection Expressions that refer to fields in the specified historical databases. The syntax is “prefix.field”, as in “py.salary” where “py” is the prefix associated with a database and “salary” is a field in the database. This syntax is limited to use within Define Field by Expression and Defined Field by Table library entries as used inside an Expression Set. If a key field you select is of the character type, the Match case in keys box is accessible, so that you can indicate whether you want ProVal to regard upper and lower case letters as distinct.

Click the Sample Lives button to access the Sample Lives dialog box, in which you may select up to 20 database records and run your Expression Set just for the selected records. Thus you may view results before running the Expression Set for the entire database and saving those results, which would alter the database. Enter a selection expression; if the parameter value is left blank, the entire database (up to 20 records) is selected. Next, choose a database field as your record identifier and click the Run button. A sample life report that you can print or save to a file will be produced.