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. Alt Key is an optional parameter that can be used to specify a secondary key field (or fields). When a matching record cannot be found based on the primary key field, a second check is performed using the alternate key. This can be helpful in situations where Social Security numbers or employee ID numbers are corrected from one year to the next. As an example, consider a current year database with primary key field EEID and alternate key field OLDEEID. When matching EEID in the current year database against the prior year database, a second step will be taken for any for any unmatched records. Those unmatched records in the current year will also have the alternate key field OLDEEID checked for possible matches against EEID in the prior year. 

Sample Lives

Click the Sample Lives button to run selected records through the Expression Set and display calculation details to help verify results.

To select records to run as sample lives, you can either:

You may optionally choose a database field as your record identifier such as SocSecNum, EmployeeID, etc.

To process the chosen sample lives, click the Run button.