Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Lookup function not working

Hi Everyone,

I have a lookup function that does not seem to be working. I am pulling the data from salesforce for Task and User objects:

Below is the script:

Task:

LOAD

    Id as "TaskID",

    RecordTypeId,

   OwnerId as "Task Owner ID",

    //AccountId as "Account ID",

    Subject as "Deal Support Type",

    ActivityDate,

    WhatId as "Opportunity ID",

    if(Len(Trim("WhatId"))>0,1,0) as "DealSupportflag",

     Status,

    Priority,

    CreatedById,

    LastModifiedById,

    CreatedDate,

    Date(CreatedDate) as "Task Created Date",

    Year([CreatedDate])& Dual('Q' & Ceil(Month([CreatedDate])/3), Ceil(Month([CreatedDate])/3)) as "Task Created Quarter",

    //OwnerId,

    Description as "Task Description",

    Lookup('Name','OwnerId',[OwnerId],'Owner') as "Task Assigned Name"

    FROM [lib://Salesforce QVD/Task.qvd]

Owner:
LOAD
    Id as OwnerId,
    Username,
    User_Theater__c as "User Theater",
    User_Theater__c as "Theater",
    UPPER(User_Theater__c) as "USERTHEATER",
    User_Sales_Region__c as "User Sales Region",
    User_Sales_Sub_Region__c as "User Sales Sub-Region",
    User_Sales_Group__c as "User Sales Group",
     Name,
   FROM [lib://Salesforce QVD/user.qvd]

When I try to pull the "Task Assigned Name" field in my dashboard, it does not return any data(names of the Task assigned to). Where am I going wrong?

Can you help!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Lookup function is referencing the 'Owner' table. Therefore, the Owner table should be loaded first in the script.

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Lookup function is referencing the 'Owner' table. Therefore, the Owner table should be loaded first in the script.

-Rob

Anonymous
Not applicable
Author

Thanks a ton!. So the lookup doesn't work the reverse way.