Skip to Content
author's profile photo Former Member
Former Member

Can I query by user?

Dear All

I have 3 user in SBO,a,b,c. they use the activity function and have themselves activity with AttendUser column.

Now I would like to create a query,call it my unclose activity for everyone.So I create the following query.

SELECT T0.ClgCode, T0.CardCode, T0.AttendUser FROM OCLG T0 WHERE T0.AttendUser =$[USER] and T0.Closed ='Y'

But when you run the query and get the error message.

I would not like to create 3 different query, like

..WHERE T0.AttendUser ='a'

..WHERE T0.AttendUser ='b'

..WHERE T0.AttendUser ='c'

Have any way to create one query for everybody and query they would like to get?

Glen

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jun 18, 2008 at 05:12 AM

    hi glen,

    Try this below query,

    SELECT T0.ClgCode, T0.CardCode, T0.AttendUser

    FROM OCLG T0

    WHERE

    T0.AttendUser IN ('a','b','c') and T0.Closed ='Y'

    Hope above solution works for you.

    Jeyakanthan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 07:27 AM

    hi glen,

    After executing query,use Blue filter funnel button in

    tool bar by dealt user.

    Jeyakanthan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 09:17 AM

    hi glen,

    I modified your query

    SELECT T0.[ClgCode], T0.[CardCode],T1.[USER_CODE],T1.[U_NAME] FROM OCLG T0 INNER JOIN OUSR T1 ON T0.AttendUser = T1.INTERNAL_K WHERE T1.[USER_CODE]='[%0]'

    you should append [ 'square bracket' before % and after 0.

    Query will filter results by user.

    Hope above answer will help you.

    Jeyakanthan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 02:35 PM

    Glen,

    Couple of things

    When you run the query from the Query Manager, the $[USER] field does not get the current user's value and thats probably why you are getting the error.

    Unless you link the query to a Form field like a formatted search and the user should use Shift+F2 to trigger the query.

    Suda

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      There is a Way. You need to link your saved Query Report to Field in the Sales opportunities window from where your User can click Shift+F2 and get the report specific to their User.

      KEY: Trigerring the Report from within a Form NOT THROUGH QUERY MANAGER

      Suda

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.