Skip to main content
Niall Brownlee (Aegon UK) 님이 #CRM Analytics에 질문했습니다

Hello

 

I'm currently outputting the current user Full Name in CRM Analytics, but I'd like to change this to only show First Name.  It seems like this should be simple but I'm struggling to find the field name to use.  My current code is below - which successfully outputs my own name on screen:

 

q = load "User";

q = group q by all;

q = foreach q generate "!{User.Name}" as 'username';

q = limit q 2000;

 

When I change "!{User.Name}" and instead use "!{User.FirstName}" it returns and undefined values and therefore just outputs the string "!{User.FirstName}" on screen.

 

Thanks for any help!

답변 3개
  1. Prabhat Mishra (Salesforce) Forum Ambassador
    2024년 1월 18일 오후 3:43

    Hi @Giuseppe De Stasio,

    Only user.id, user.name, user.rolename, and user.roleid tokens are supported.

     

    You can try :

    q = load "User";

    q = filter q by 'Id' == "!{User.Id}";

    q = group q by ('FirstName');

    q = foreach q generate 'FirstName' as 'FirstName';

    q = limit q 2000;

    or use a direct query:

    SELECT FirstName FROM User WHERE Id = '!{User.Id}'
0/9000