Comparing dDocAuthor, Username  in Weblayout query

We're on a Windows system, the UCM user names are in the format "XDOMAIN\smith" with a single embedded "\" character.
I'm trying to construct a custom query in the Weblayout editor to pull documents authored by the current user.
A query like
dDocAuthor <matches> `XDOMAIN\\smith`
works fine (using two "\" characters in the right hand expression).
However, I want something generic for all users, e.g.,
dDocAuthor <matches> `<$Username$>`
This results in zero rows because of the embedded "\" character, I think. I've tried
dDocAuthor <matches> `<$strReplace(Username,"\","\\")$>`
but that does not work either.
Any ideas are appreciated.

couple things:
1) make sure you're using camel case: <$UserName$>
Per the documentation here: Idoc Script Reference Guide > Idoc Script Index > UserName
2) try using the like operator <$if dDocAuthor like UserName$> should evaluate to true
3) if all else fails, use explicit substring operators
<$onlyUserName=strSubstring(UserName,7)$> (note: 7 is the starting index for the substring based on the 0-based lenghth of your domain and the slash)
<$if>
<$dDocAuthor==onlyUserName$>
some stuff
<$endif$>
hope this helps
Billy Cripe
Fishbowl Solutions

Similar Messages

  • Compare the result of a query with a number and return a message

    Hello,
    I have the following query in oracle 9i:
    SELECT COUNT(*)
    FROM hourly_files
    WHERE date_received = TO_DATE((SELECT TO_CHAR(SYSDATE - INTERVAL '1' DAY,'DDMMYYYY')
    FROM DUAL), 'DDMMYYYY');
    This will produce a count of the required rows
    I need to compare the output number with another hardcoded number (threshold) and print an appropriate message e.g.
    if the output of the above query is 18000 and the threshold number is set to 20000, then output a meesage:
    Number of files received less than 2000
    Any help will be much appreciated !
    Thank you.

    SQL> ed
    Wrote file afiedt.buf
      1  SELECT CASE WHEN COUNT(*) >5 THEN 'Number is > than 5'
      2              WHEN COUNT(*) <1 THEN 'Its less than 1'
      3  ELSE 'Its in between'
      4  END
      5  FROM emp
      6* WHERE deptno=20
    SQL> /
    CASEWHENCOUNT(*)>5
    Its in between
    SQL> SELECT COUNT(*) FROM emp
      2  WHERE deptno=10;
      COUNT(*)
             3

  • BW Username Variable in query available for  Row Level basedAuthorization ?

    Hi Authorization- and Bexs-Profs,
    I have an Row Level Authorization Model:
    The acces to the InfoCube data is based on Row Level and on access control definition
    data hold in an ODS ( Table/Data).
    The access control definition data hold in the  ODS descibes per BW User which
    selection citeria can be read.
    I want  to build up a MultiProvider with the access control definition ODS and the InfoCube and
    restrict in the Query the access control definition with the BW Username.
    How can I have access to the BW Username in a BEX Query ?
    Thank You a lot !
    Martin Sautter

    Thanks user10615659     ,
    - Yes the variable ROLES available in OBIEE 11.1.1.7.1
    - Tested the init block and variables in offline rpd its working as expected.
    - In online rpd, except ROLES and GROUP variable remaining variables working fine.
    - Verified log file in both online and offline init block testing - the init block execution is successful.
    Thanks

  • How to compare dates in a select query in open sql

    Hi
                       How can I retrieve data pertaining to a specified date using a select query.
    I have inserted date using the following code:
    String dateString = "2009-03-11";
    java.sql.Date date = java.sql.Date.valueOf(dateString);
    PreparedStatement stmt =con.prepareStatement("insert into DATEACCESS"
                                                                            + "(DATETEST)"
                                                                            + "values (?)");
    stmt.setDate(1,date);
    stmt.executeUpdate();
    How can I pass this in a select query,the below mentioned query did not fetch me any results.
    Select * from  DATEACCESS where DATETEST='2009-03-11'

    Hi
    Has ur date  problem resolved  ?
    If not resolved u can do the following
    As u already have sql date today declared . You want to get the data depending on that date
    As ur query is
    if( today != null)
    String query2 = select * from DATEACCESS where DATETEST<= ?
    PreparedStatement ps = conn.prepareStatement(query2);
    ps.setDate(1,today)
    ResultSet rs = ps.executeQuery();
    While(rs.next)
        ////// Here u will get data from query u needed ///
    If this also does not work just print the date and check in which format is it returning u .
    Regards
    Anuradha Rao
    Edited by: Anuradha Rao on Mar 20, 2009 10:16 AM

  • Comparing Uppercase record with lowercase query

    Hi, im working off of a database with all uppercase values currently and im attempting to do a like clause to pull out of the database something "like" the value I'm using to query. For example, if the lastname is SMITH, and I enter Smi%, I want to pull SMITH out of the database without having to enter a capital SMI%. Whats the best way for me to do this comparison?

    As Justin said, using UPPER(column) will stop you from using indexes on that column in a query. Function based indexes are one way around that. The other way would be to create a trigger BEFORE INSERT OR UPDATE of the table to normalize tha lastname column. something like:
    CREATE TRIGGER norm_name
    BEFORE INSERT OR UPDATE ON table
    FOR EACH ROW
    BEGIN
         :new.lastname := UPPER(:new.lastname);
    END;You could also use INITCAP instead of UPPER if you want the names in mixed case. That way, you will at least have a standard way of querying even if you can't make your users behave.
    John

  • Dicoverer Viewer is Slow Compared to DiscovererPlus for same query...why ??

    Hi,
    I have a report whcih runs from a custom table which gets populated daily in the night.
    It retrieves aroun 98000 records widout parameters.
    The report runs in around 4-5 seconds in Discoverer Plus wheras in
    Discoverer Viewer it is taking almost 45-50 seconds...Could anyone please advice as to what could be
    the reason and can we do some thing to make the Viewer equally fast as Viewer is the Discoverer Tool
    we are giving the users access to and with this speed it would not be acceptable.
    Plz Advice ASAP.
    Thanks,
    VJ

    Hello Raptole,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    OS X Mountain Lion: If your Mac runs slowly
    http://support.apple.com/kb/PH10798
    Mac OS X: Setting up Login, Startup items
    http://support.apple.com/kb/ht2602
    Log in as the user who wishes to have a login item or as an admin user.
    Choose System Preferences from the Apple menu.
    Choose Accounts from the View menu.
    Click the name of the user.
    Mac OS X 10.4 or later: Click the Login Items button.
    select things you dont need and Click the "minus" button.
    Best of luck,
    Mario

  • How to get the current username (Adf Security) in a VO query?

    Hi all,
    I want to filter a VO query using the current username in the where clause. What is the correct object in the security context to do that?
    Thanks.
    JDEV 11.1.1.7

    Hi,
    Do not directly put the username in your query, you query should be something similar to:
    select abc, bcd, user_code FROM TABLE
    WHERE (USER_CODE = :LoggedInUser)
    then create a bind variable "LoggedInUser" of type String with value type as expression and value as (adf.context.securityContext.userName)
    - Lalit

  • "how to use Query include one month "

    Hi all expert,
    How to make a request how to add table "QTYSALES one month yesterday"
    so that I can compare with this month.
    Query me this:
    SET ARITHABORT OFF
    SET ANSI_WARNINGS OFF
    SELECT T0.ItemCode, T0.Dscription,T1.OnHand, convert(varchar,SUM(T0.BaseQty*T1.NumInSale)) AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END)))AS 'TURN OVER IN MONTH'
    ,round(convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END))),4)* 30 AS 'Turn Over Days'
    FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
    WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
    GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand
    union
    SELECT T1.ItemCode, T1.itemname,T1.OnHand, '' AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,'No Sales' AS 'TURN OVER IN MONTH'
    ,NULL
    FROM DBO.OITM T1
    WHERE T1.ITEMCODE NOT IN (SELECT ISNULL(ITEMCODE,0) FROM INV1)
    GROUP BY T1.ItemCode,T1.itemname,T1.OnHand
    ORDER BY 1
    thanks for all
    Edited by: rachelhel on May 20, 2009 8:06 AM

    haiiii allll pls help...thankss
    Hi consulatant B1
    How to use Query
    My goal is to create a table to see * The number of sales in a month yesterday *
    I want to make a request showing the amount of sales at the end of the month.
    For example this month is on May 25, so I want to show the Quantity of one month April 25
    I have tried several times, but still just wrong.
    I need expert help to solve the problem for me.
    thanks

  • Error in using aggregate function in Outer Query in Siebel Analytics

    Hi,
    When I am using aggregate function in outer query in Siebel Analytics I am facing error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 59111] The SQL statement must include a GROUP BY clause. (HY000)
    Bellow is the code.
    SELECT test1.username saw_0, test1.desg saw_1,COUNT (test2.querydate) saw_2
    FROM (SELECT POSITION.CBL username,
    POSITION.CBP desg
    FROM "CM"
    WHERE (POSITION.BPTCD = 'Marketing')
    AND (POSITION.EDate =TIMESTAMP '1899-01-01 00:00:00'
    ) test1,
    (SELECT users.UN username,
    measures."Query Count" querycount,
    measures."Max Total Time" secs,
    topic.db dashboardname,
    "Query Time".DATE querydate
    FROM "Plan"
    WHERE (topic."Dashboard Name" IN ('DS'))) test2
    WHERE test2.username = LOWER (test1.username)
    AND test2.dashboardname = 'DS'
    GROUP BY test1.username, test1.desg

    Should your query be a valid SQL query?
    I can't think that the query you have would be valid in a SQL plus window.
    Chris

  • Can I use LDAP server's authentication mechanism rather than comparing password ?

    Hi All,
    The weblogic security and adminguide says that the user authencation can be of
    the following 3 types:
    1. Bind specifies that the LDAP security realm
    retrieves user data, including the password for
    the LDAP server, and checks the password in
    WebLogic Server.
    2. External specifies that the LDAP security
    realm authenticates a User by attempting to
    bind to the LDAP server with the username
    and password supplied by theWebLogic
    Server client. If you choose the External
    setting, you must also use the SSL protocol.
    3. Local specifies that the LDAP security realm
    authenticates a User by looking up the
    UserPassword property in the LDAP directory
    and checking it against the passwords in
    WebLogic Server.
    But say I want that my users should be authenticated by the LDAP server rather
    than picking up the password from LDAP and comparing at weblogic end. Then what
    should I do ?
    Because no. 2 is applicable only for ssl certificates, no.1 and no.3 picks up
    password using the login dn and password provided at the time of configuration
    of realm and compare with password given by user.
    And once gain there some issues on having picking up password and comparing it:
    1. Netscape directory server can store the password in oneway hashed form(and
    that is preferred , too). So when userpassword attribute is read , it's in one
    way hashed form. So how the comparison will go on ?
    2. Creating a user who has the access to user data along with userpassword attribute
    itself is a security threat, as if someone can crack that user's dn and password
    then he/she can do anything as userdata can be read.
    Any suggestion is welcome.
    TIA,
    Sudarson

    Thanks a lot Jerry.
    I got these stuff from weblogic 6.1 docs sets security.pdf and adminguide.pdf.
    I have another question, if that is the case (in Case of BIND), then why do we
    a require a dn of user and password who has the access to read the entire directory
    And at the same time, u specified this for Bind, what are the cases for other
    two-local and external ? And then what is actually difference between Bind and
    Local ?
    Pls help me.
    Thanks,
    Sudarson
    Jerry <[email protected]> wrote:
    Hi Sudarson,
    Whatever doc you were reading is at least partially incorrect, unfortunately...
    I know for sure that when you specify BIND, weblogic sends the username/password
    to your
    LDAP server in an attempt to bind to it.
    If the bind is successful, WLS determines that the username/password
    pair were correct.
    If the bind was unsuccessful, WLS determines that the username/password
    pairing is not
    valid.
    At all times, WebLogic is letting the LDAP server do the actual compare
    of
    username/password. WLS does not, at any time, retrieve a password from
    the LDAP server.
    I hope this helps,
    Joe Jerry
    sudarson wrote:
    Hi All,
    The weblogic security and adminguide says that the user authencationcan be of
    the following 3 types:
    1. Bind specifies that the LDAP security realm
    retrieves user data, including the password for
    the LDAP server, and checks the password in
    WebLogic Server.
    2. External specifies that the LDAP security
    realm authenticates a User by attempting to
    bind to the LDAP server with the username
    and password supplied by theWebLogic
    Server client. If you choose the External
    setting, you must also use the SSL protocol.
    3. Local specifies that the LDAP security realm
    authenticates a User by looking up the
    UserPassword property in the LDAP directory
    and checking it against the passwords in
    WebLogic Server.
    But say I want that my users should be authenticated by the LDAP serverrather
    than picking up the password from LDAP and comparing at weblogic end.Then what
    should I do ?
    Because no. 2 is applicable only for ssl certificates, no.1 and no.3picks up
    password using the login dn and password provided at the time of configuration
    of realm and compare with password given by user.
    And once gain there some issues on having picking up password and comparingit:
    1. Netscape directory server can store the password in oneway hashedform(and
    that is preferred , too). So when userpassword attribute is read ,it's in one
    way hashed form. So how the comparison will go on ?
    2. Creating a user who has the access to user data along with userpasswordattribute
    itself is a security threat, as if someone can crack that user's dnand password
    then he/she can do anything as userdata can be read.
    Any suggestion is welcome.
    TIA,
    Sudarson

  • Problem in a Web Intelligence Rich Client Query

    Hi all,
    I'm facing a problem when i tried to create a query in WebI.
    I'm using a BI 7.1 Query as source of my Universe.
    My problems beggin when I put all the objects that I need in the query.
    The object "Date" that should be my 0Calday, came as "01/01/1970".
    I fixed that on the Universe setting the object as "Date/Time" Category.
    I thought that my problems are all gone, but when i tried to compare the values on the Query with those in BI, they do not mach.
    So i think that there is something wrong with the object "Date".
    I still have another problem.
    The object that i put in the line of my query is "LQPOSIT" Liquidity Item, that shows more than one line to a single Liquidity Item and I need a single line to a single Liquidity Item.
    Anyone can help me?
    Thanks.

    Hi, Thank you for the help.
    Ok, date problem solved.
    My second problem happens when I insert the Liquidity Item dimension (101) in the report lines. I need each Liquidity Item to be shown in a line, but what is actually happening now is that, if there are numerous input on the source for the same Liquidity Item in the same day, a lot of lines are created with the same Liquidity Item and I need these numerous lines to be merged into only one per Liquidity Item.
    For instance:
    This is what is shown:
    01.07.2010-----02.07.2010---03.07.2010                   
    Liquidity Item 1001001----
    ( - 350,00)-----(  50,00   )---( 50,00)
    Liquidity Item 1001001----
    (  450,00 )----
    (150,00  )------(150,00)
    Liquidity Item 1001001----
    (-  750,00 )-----( 150,00 )----(  90,00)
    Liquidity Item 1001001----
    (  850,00  )----(- 750,00 )---(- 450,00)
    Liquidity Item 1001001----
    (  50,00  )----
    ( 50,00 )-------(450,00)
    And what I actually need it to show is the following:
    01.07.2010----
    02.07.2010----
    03.07.2010                   
    Liquidity Item 1001001----
    250,00----
    150,00----
    290,00
    Now that the date problem is solved, I am facing another issue. Putting the query in a cross reference format, where in the lines I have the Liquidity Items and in the colums I have the days in a row, the cells are filled by the transacted value. However, the values present in the lines don't match the ones in the BI. Does anybody know how I can solve that?
    Thanks
    Edited by: Eduardo Carreira Martins Gonçalves on Jul 27, 2010 7:00 PM

  • BW Query showing more Material than R/3 Query, Why..??

    Hi All,
    I am facing problem when running the query on Inventory cube 0IC_C03.
    I have loaded data from 3 Data Sources 2LIS_03_BX, 2LIS_03_BF and 2LIS_03_UM as mentioned in below link and strictly followed by applying Marker updates after the load
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Now the problem is,
    End User trying to compare BW Inventory Query (Plant Analysis: Stock) values with MC.1 (Plant Analysis: Stock: Selection)
    In R/3 (MC.1) showing the total number of materials are 3755 for the period 01.2008
    In BW Query for the same period (01.2008) total number of materials are 3960
    I am doubting why BW showing more materials?, this resulting the differance value for Valueated Stock value and Valuated Stock Quantity when we compare with R/3.
    When i am comparing material wise in BW query with MC.1, whatever the missing Materials are showing in BW Query as 0 Quantity but some value
    Ex:    Values is =  -£ 51.46 and Quantity is = 0 EA
    Please provide me some inputs, your help will be appreciated.
    Regards,
    Rajesh

    Hi Rajesh,
    Please check the Material numbers which are coming extra in BW not in R/3 whether they are under any material group. If they are all in under the "#" material group then u can restrict the query by filtering the material group "#".
    Just filter Excluding the "#" material group in the query.
    Then you will get the right values.
    Hope this may help you.
    The difference between the BW and R/3 material numbers is because. Some extra materials may get from the UM datasource, so you are getting only values and not the quantities.
    Try the above idea. I hope it works.
    With Regards,
    Ravi Kanth.

  • How many records will be selected by query ?

    Hello experts,
    what is the effect of filtered constant value (set in the filter area) on authorization? if a user is authorized for 3 values of a char, namely, abc, def and colon (,  and in the query this char is restricted to a constant value which is one
    of the 3 values, for example, abc, does the user get to display aggregated amounts of 3 similar records which are differentiated only by the char in question or is it that the filter will neutralise the effect  of the colon such that user can only can see the record containing value abc instead of aggregated amount, assuming there are only 3 records in the cube?
    many thanks.
    YHogan
    *I promise to award points for good answers.

    Hello,
    not sure that i have right understood your question.
    The : authorization has the effect, if you do not include the appropriate char in the query, the query then aggregates the data over the char, the user can see the results. If you have the char in the query (for example in the filter part), you should restrict it to the authorized values (: will be not taken in account).
    Commonly the system compares the structure of the query (or the generated SELECT statement) vs. the user authorization and does not compare the returned data vs. user authorizations.
    Hope this helps,
    Regards,
    Kirill

  • How to tokenize the result from a query

    Hi,
    I need some help in writing a query or stored procedure for the following scenario
    select rname from emp where username='user200';
    This query will return the result,as comma separated,in the format r100,r101,r102
    Now,I have to write another query using the above result like below
    select place from loc where rname in ('r100','r101','r102');
    Basically,I need to break the string 'r100,r101,r102' into 3 tokens.Can someone help me write a stored procedure or query for this?
    Thanks
    Ravi.

    Ravi, Try this.
    CREATE OR REPLACE procedure str_token
    is
    input_buffer varchar2(100);
    var1 varchar2(10);
    var2 varchar2(10);
    var3 varchar2(10);
    n1 number(4);
    n2 number(4);
    n3 number(4);
    cursor c1 is
    select place from loc1 where rname in (var1,var2,var3);
    begin
    select rname into input_buffer from emp1 where username='user200';
    n1 := instr(input_buffer,',',1,1);
    n2 := instr(input_buffer,',',1,2);
    n3 := length(input_buffer) + 1 ;
    select
    substr(input_buffer,1,n1-1),
    substr(input_buffer,n1+1,n2-n1-1),
    substr(input_buffer,n2+1,n3-n2-1)
    into var1, var2, var3
    from dual;
    for i in c1
    loop
    dbms_output.put_line('place:'||i.place);
    end loop;
    end;
    Regs,
    Karthik

  • Problems with lookup query

    Hi all,
    I added a lookup query in a form.
    The query is:
    select lkv_encoded ,lkv_decoded from lookup_ad_folder_vw where lkv_encoded not in (select encoded from ad_folder_vw where usr_login = '$Requester Information.User Login$')
    I need to filter by the beneficiary's username.
    This query works if the request is a self-service request. But if it is requested by other people, it doesn't work. Because the parameter "$Requester Information.User Login$" gets the requester login.
    My question is the follwing:
    How can I get the beneficiary's username?
    Are there any workaround for this?
    Thanks,
    Ariel

    As this looks moreover like a Object Form, so their is nothing you can do in this query to get the Beneficiary's username. The reason is simple that you can select multiple target users in the same request with the same Object Form and OIM in that case would not be aware as to which information from all the beneficiaries should be supplied.
    If this would have been a Process Form then individual beneficiary username could directly be mapped as every user would have its own sub-thread in that case during provisioning.
    Thanks
    SRS

Maybe you are looking for

  • ESI deduction for mid joining employees

    Hi Friends For an employee joined in 05th Feb, master data salary is Rs.14768.77 (sum of wagetypes considered for ESI calculation)  and the actual salary calculated is Rs.12941.43. For the purpose of ESI deduction the calculated salary is projected f

  • ITunes to iPod error

    During the initial loading of my 5G iPod, iTunes displayed the message "Attempting to copy to the disk "Bob's Ipod" failed. The disk could not be read from or written to." I can restart the update and iTunes picks up where it left off. All songs on t

  • Problem with Session with OCS 10g

    Hello, I'm trying to connect to OCS 10g via web services. At the moment i'm trying the sample provided with the content manager SDK. I can login correctly to the "remoteLoginManager" and i obtain the sessionCookie. But when i call any other webServic

  • HT1420 My household has 6 computers & a server - how can I authorise more than 5 pc's

    My household has 5 laptops and a Mac Server, plus 6 iPhones, 3 iPads & 5 apple tv's.  However we can't access the shared library on all devices because Apple will only allow 5 pc's to be authorised.  When I purchased the server I was told it wouldn't

  • Need help on setting up proftpd

    Hi, all I have some trouble get my proftpd work. When i login as anonymous user, it returns '530 Login incorrect' Then i checked log file, it said that it was due to 'Invalid shell' error Sep 16 10:20:21 localhost proftpd[4759] localhost.localdomain