How to make dashboard tracker fields mandatory

Hi there,

I am developing a dashboard. I have a tracker that filters on (say) 4 fields. I want to set Field 1 & Field 2 as mandatory filter and leave Field 3 & Field 4 optional. How can I achieve that?

If I am checking ‘criteria required’ box on tracker properties, it only forces any one field to be filled. But I want to have Field 1 & 2 mandatory.

Thanks.

A BPM on the BO Ice.DynamicQuery.Execute could detect the params uesed, and if they aren’t found, then show a message and exit.

Thanks Calvin.

Can you elaborate a bit more? I have not used BPM yet.

This would be a difficult BPM to try as your first. But if you are adventurous…

Method Directive:
BO: Ice.DynamicQuery
Method: Execute
Type: Pre-Process

Show Message 0 is just to show the values of various fields in the query the dashboard executes

Condition 0 checks for the two field names in the qry expression
(replace “InvcHead_InvoiceNum” and “InvcHead_InvoiceDate” with your field names)

Show Message 1 Alerts the user that the required fields weren’t provided.

image

Set Field 0 sets the qry so that no data is returned.

image

The expression I set it to is:

"(InvcHead_InvoiceNum <= N'0') AND (InvcHead_InvoiceDate <= N'1966-11-24T00:00:00')"

That’s a set of values that are guaranteed to not return any data.

If you don’t do the “Set Field” block, it would just return the data (using just the one param) to the dashboard

EDIT!!!

That would run for every BAQ that is executed (dashboards, reports searches, etc…)

So you’d need to put another condition to check for the source that executed this.

Appreciate that. I will give it a try.