Record Selections
Record selections include the following features:
- Improved "Is in the List" and "Not in the List" options, allowing developers to have a nearly-unlimited number of list values.
- Clearer instructions for developer inputs such as: Constant values, Application field values, and Runtime Value Prompts (where applicable).
- Improved Range and Null options, taking the guess work out of creating these types of record selections.
- Confirmation page when deleting record selections.
This document will discuss several of the Record Selection features.
Jump to:
Relationships
Value Options
Reordering & Grouping
Relationships
While all existing relationships remain, some have been significantly improved. Each of these will be noted below.
Is in the List/Not in the List
A common complaint with the previous Record Selection was the List values were limited to a handful of characters. With this enhancement, the amount of list values you enter is nearly-limitless! Simply put each value of your list in a separate input box. Need more? Just click on the "Add…" text to insert more input boxes. Additionally, if you choose "Runtime value(s) prompt" for the Value, your end-user will have the same functionality at run-time.
Note: When adding a drop-down list via m-Painter in this scenario, be sure to add it on the input box labeled "${select.RXXX?html} (where your Record Selection # matches XXX). When this is added successfully, you will see the other options switch to disabled. Below is a screen-shot of m-Painter's prompt page. When adding a drop-down option to an "In the List" record selection, be sure to add your drop-down option on the correct input box (illustrated with an arrow).
Is in the Range/Not in the Range
When an "Is in the Range" or "Not in the Range" relationship is selected with "Constant value" selected, you will see two input boxes for your Range value. Simply add each end of the range in the appropriate input box and click "Accept".
Is Null/Is Not Null
If you decide to use the relationships of either "Is Null" or "Is Not Null", you will see all "Value" options removed from the screen. This is done intentionally as no more input is required from the developer. Click "Accept" to create this Record Selection.
Date Relationships
When a true date field is selected as the record selection field, new options date specific options become available for the relationship dropdown. Common date values include today, yesterday, this month, etc. To allow the end-user to perform runtime period analytics where they can compare date ranges against one another, use the 'Period Analysis' relationship. Full documentation on this feature can be found here.
Value Options
Constant Value
This is a basic Record Selection screen. By default, when creating any application you will have the option, as developer, of specifying a constant value as a record selection value for this application. This record selection cannot be modified by your end-user.
Application Field Value
This Record Selection option allows you, as a developer, to specify a record selection by comparing one field in your application to another field. You can only compare like fields (Numeric to Numeric, Alpha to Alpha, etc.). In addition, only certain relationships will allow this comparison option. When a relationship is not allowed, "Application Field Value" will be removed from the Value drop-down option.
The relationships that allow this comparison are:
- Equal
- Not Equal
- Greater than
- Greater than or Equal to
- Less than
- Less than or Equal to
- Not greater than
- Not less than
- Contains
This record selection cannot be modified by your end-user.
Runtime Value Prompt
The final option you have for Record Selections as a developer is to allow the end-user to decide at runtime what their record selection should be. This option is called "Runtime value(s) prompt". This option is only available when creating Reports or Summaries.
Default Value
When utilizing the Runtime Value Prompt option for record selections, you have the option of defaulting a value. At runtime, the entered default value will display in the runtime record selection input. The end-user has the option of changing this value if wanted. If using run=2 and not specifying a value for the record selection, the default value will be used.
Reordering & Grouping
Once you become familiar with record selections, you will encounter many times where grouping and reordering become very important. For instance, I have an example here where I am currently selecting all customers in a certain range that are also from Ohio. Perhaps I would now like to also select all customers in the same range who are also in Illinois.
If I look at my current selections, we can see that one way to do this would be to copy the first selection, and then create a new selection for Illinois customers. To do this, I will click copy and save the first selection, then I will click create new selection and set this value to check for IL. Additionally, I will set this and/or to or.
As can be seen, these selections are out of order, so to fix, I can click the Group & Reorder Selections button. On this screen, we will begin by reordering our selections so the OR falls in the appropriate place. Once done, we will click Save and Review Selections.
This is certainly one way to set these selections up, with the range duplicated across an OR statement. As we look at the application preview, we can see that this does work, however it should also be quite clear how this can easily become unmaintainable as my selections increase from two states to three, or from four selections to six. This could also cause additional issues if I needed one or more of my selections to be a runtime prompt in a report or summary.
An alternative approach is to use grouping within our record selections. To do this, let's go back in to the record selections screen. First, let's delete our duplicate selection by clicking the delete icon next to the third selection. Now, let's set up a group around our states. To do this, click the Group & Reorder selections button again.
This time, instead of reordering, we are going to add a new group by clicking the Add Group button. This allows us to add a group around two or more selections. In this example, we want to group the two state selections, so I will click the start group button next to the first state selection, and then click the end group button next to the second state selection.
Once done, I can add another group of remove an existing group, if needed. In this case, we are done so I will click Save and Review Selections. Notice how I cannot delete those record selections until the group around them has first been removed. Now, let's return to the application preview by clicking the Done with Record Selections button. As can be seen, the retrieval displays the same records as before, with a much simpler and more maintainable set of selections. These groupings can be used in any template with any selections to make your applications easily select the desired data.