Please consider registering

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS Related Topics
Where Clause Query Parameters - Current User
August 31, 2010
9:27 am
Forum Posts: 4
Member Since:
August 7, 2013

I would like to pass in a parameter for current logged in user in a where clause for a work order search, so that the results in a result set only brings back records for the user currently logged in.  I tried "where reportedby = &USERNAME&" but the UI does not recognize this parameter.


Any ideas?


Thanks in advance,


August 31, 2010
11:36 am
Lima, Perú
New Member
Forum Posts: 1
Member Since:
August 7, 2013

Try with

where reportedby = :USER



September 6, 2010
1:14 pm
New Member
Forum Posts: 1
Member Since:
August 7, 2013

&USERNAME& is only use in DB Configuration. Try with :user

March 20, 2015
1:42 pm
Tom Kennedy
Forum Posts: 8
Member Since:
March 2, 2015

Indeed that works for the current logged in user.  However, if you save the query, that users id 

is stored the the saved query.  So it does not work for other users.


How can I save a query that does not have :USER instantiated?

March 24, 2015
5:45 pm
Glen Holt
Forum Posts: 10
Member Since:
August 8, 2013

I may be misunderstanding, but here is what I do:  After saving when you go into 'View/Manage Queries' you should be able to change all of these to :USER, click Ok and it's all set up. Any user clicking on the query will only see results associated with their labor code.

March 24, 2015
10:54 pm
Joe Lonjin
New Member
Forum Posts: 1
Member Since:
October 17, 2014

Yes I believe the issue described after trying :user is that you ran the query and then tried to save it. When you do this the system inputs the :user parameter from the logged in user and that is now displayed in the where clause. Glen is right, open the View/Manage Queries and open the clause, change the userid back to :USER and save.

Forum Timezone: America/New_York

Most Users Ever Online: 54

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

madd0g17: 46

vkumar: 30

mandreas: 29

david.stetson: 29

zeezoe: 24

cagola: 24

Member Stats:

Guest Posters: 0

Members: 8410

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 1023

Posts: 2940

Newest Members: Eric Addington, rpratt, Anthony Gomes, Arnab Sinha, Chandan Singh, s sandhu

Administrators: Chon: 843