MAXIMO Forum

Please consider registering
guest

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
dkitzelman
Member
Members
Forum Posts: 4
Member Since:
August 7, 2013
Offline

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,

Derek

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

Try with

where reportedby = :USER

 

Edwin

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

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

March 20, 2015
1:42 pm
Tom Kennedy
Member
Members
Forum Posts: 18
Member Since:
March 2, 2015
Offline

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
Member
Members
Forum Posts: 10
Member Since:
August 8, 2013
Offline

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
Members
Forum Posts: 1
Member Since:
October 17, 2014
Offline

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:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

madd0g17: 49

vkumar: 30

cgregory: 30

mandreas: 29

david.stetson: 29

Maximofresher: 25

Member Stats:

Guest Posters: 0

Members: 8739

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 1093

Posts: 3131

Newest Members: Eknath, priyanka.k, dispys, mandapallesaikumar, JoelR, kalityidol

Administrators: Chon: 877