Question

BAQ Criteria by user

  • 11 December 2020
  • 3 replies
  • 398 views

Hello,

 

I am looking into a BAQ where I would like the criteria to be based on a user’s name.

For example: I run the BAQ and the parameters asks for first name. When I enter my name, it will run with a specific set of criteria, but when user B enters their name, the criteria will change.

Also, the criteria is a criteria set. Based on the user, several filters will need to apply.

 

Is this possible?

Thanks!

Arno


3 replies

This is possible.  You could potentially use a BAQ constant to get the current userid.  That way it will limit issue of folks entering in wrong information.

Ken,

 

That would even be better! Would yo happen to have any insight on how to set the criteria, based on the logged in user? Any pointer in the right direction would be of great help.

 

Thanks!

Arno

Userlevel 3

Arno, 

You have several options on how to work with this.

  1. Using the BAQ Constants function - you can pull in the userID.
  2. UserCodes - you can make the key field the using name and the code would state what “level” they can see.  In the criteria you could have a case statement to return data.
  3. Using a UDTable - create an updatable BAQ that defaults the UserID in Key1 the other fields can hold responses like date1 and date2 - I have done this for filtering orders taken during a time frame.  In your other BAQ, pull in the UDtable as a subquery which will filter the OrderHead table based on order date is between UD11.date1 and UD11.date2.

    Deploy the dashboard with both queries to allow updating the dates.

     

  4. Using user table - enter in UserID with values you have set for ShortChar01, 02, Number01, 02, etc.
    This table then is pulled into the BAQ as you means of filtering or calculating results.

Hope that helps.

 

Bruce Larson

bruce@larsonsolutions.com

 

Reply