Let Users Specify Exact Criteria for Reports
Users may need to query more exact report criteria. For example, it may be necessary to review the list of orders from the client John Smith during a specific period.
To allow users to specify exact criteria for the View/Report, adjust the Ask the user
option.
-
First of all,
Create
orEdit
the View you want to use. -
In the Matching section, select the
Only records that meet certain criteria
option. -
From the drop-down list on the left, choose the column that should be filled in by the user.
-
Then select the operator.
-
In the third field, choose the
Ask the user
option.
The chosen operator specifies the value that a user will enter. For example, if you choose the "is" operator for the "Client name" text column, the user should enter a full client name. In case you set the "contains" operator, a user may enter only the first or last name of a client, and records containing these names will be shown.
When the lookup column or a simple text/numeric column is selected, the system will render a simple edit box for user input.
If the Ask the User
option is applied to the Text/Numeric column with choices or User column, or Reference column referring to another table, the "is" operator is recommended. Moreover, TeamDesk will display the dropdown box instead of the simple edit box.
Please notice that in the case of Related Details displaying, all filters with the
<ask the user>
option are ignored. Therefore, if you need to apply dynamic filters for related details displaying, create auxiliary columns in the Master table and add match conditions to the relation. Moreover, the values kept in the auxiliary columns can be changed by custom button.
Using Custom Formula for Input Filter Parameters
When you need to use complex or non-standard conditions, or make an input parameter required, you can use a custom formula for that.
You can use the Ask function in conjunction with the Parameter function. If the user omits a parameter during input, the system will replace the corresponding Ask()
function call with true
. This way, you can enter only the parameters you need.
For example, the following formula will ask for a date and client name, and filter records before the specified date and where the client name contains the entered text:
Ask([Date] < Parameter([Date], "Date Before")) and Ask(Contains([Client Name], Parameter([Client Name])))
If the user omits the "Date Before" parameter, the formula will be calculated as true and Ask(Contains([Client Name], Parameter([Client Name])))
.
If the user omits the "Client Name" parameter, the formula will be calculated as Ask([Date] < Parameter([Date], "Date Before")) and true
.
If both parameters are omitted, all records will be returned using the formula true and true
.
You may also make an input parameter mandatory. For example, the following formula will ask for the product name and require the input parameter:
Ask([Product Name], Parameter([Product Name], true))
Using a custom formula for <ask the user>
functionality provides great flexibility for creating reports that require user input. You’re not limited to the wizard functionality — you can change the parameter name, create a virtual parameter not linked to a column, and make the parameter required.