Use the TierListViewFunction in a validation
Overview
To determine if a button should show or not, sometimes all that is needed is to know whether or not a record exists.
Details
As an example, if additional documentation or monitoring is necessary when a patient takes a PRN medication, you can use a button to open that documentation. The button will only appear when a PRN medication already exists and will not appear if there are no PRN medications.
To set this up, start with a TierListView, TierLookup and TierListViewFunction. The way this functionality works is that the TierListView will populate with PRN medications if the client has any. The TierListViewFunction will count the number of rows. When the TierListViewFunction shows a value greater than 0, the button will appear. If there are no PRN medications, the button will not appear.
Steps
These steps illustrate just one example of how to use the TierListViewFunction Count parameter in a validation.
- In the Object Inspector, for the TierListViewFunction, set the FunctionType property to Count.
These four controls work together, as shown in the following example.
- ListView
- LookUp
- Button
- ListViewFunction

- Still in the Object Inspector, set the following properties for the button.
- HideOnValidation must be selected
- Validation will be set to show that the number in the TierListViewFunction is greater than zero

