Nested lookup transform issue

Hello,

Could someone please help me in fixing below transform issue. My logic in this transform is, if value doesn’t exist in locationlookup attribute table then it should print the value from the input attribute. Need to compare 2 account attributes. Any input/findings will be really helpful.

Error: “There was an exception while calculating the value for this attribute. Error during transformation for attribute: adou (Transform ID: AP OU lookup test) Cause: Lookup transform has no table”

{
    "name": "AD OU lookup",
    "type": "static",
    "attributes": {
        "locationlookup": {
            "attributes": {
                "location": {
                    "attributeName": "Location",
                    "sourceName": "Workday"
                },
                "type": "accountAttribute"
            },
            "table": {
                "LOC_003": "OU=MO_Sxxxxxxxx,OU=AP_SaintLouis,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_006": "OU=MO_xxxxxxx,OU=AP_KansasCity,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_004": "OU=TX_xxxxxx,OU=AP_Houston,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_007": "OU=TX_xxxxxxxx,OU=AP_Austin,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "default": "other"
            },
            "type": "lookup"
        },
        "attributes": {
            "input": {
                "attributes": {
                    "attributeName": "REPORT_CATEGORY__c",
                    "sourceName": "Workday"
                },
                "type": "accountAttribute"
            },
            "table": {
                "0": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "Integrated": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "default": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "Non-Integrated": "OU=United_States,OU=Exclude_OKTA,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com"
            },
            "type": "lookup"
        },
        "value": "#if($locationlookup == 'other')$input#{else}$locationlookup#end"
    },
    "internal": false
}

Thanks,
Harish G

Hello,

This transform is not well structured; the variable “location” cannot be used in lookup, it should be mentioned as input, also the second variable is not declared …
Try this :

{
    "name": "AD OU lookup",
    "type": "static",
    "attributes": {
        "locationlookup": {
            "attributes": {
                "input": {
                    "attributes":{
                    "attributeName": "Location",
                    "sourceName": "Workday"
                },
                "type": "accountAttribute"
            },
            "table": {
                "LOC_003": "OU=MO_Sxxxxxxxx,OU=AP_SaintLouis,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_006": "OU=MO_xxxxxxx,OU=AP_KansasCity,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_004": "OU=TX_xxxxxx,OU=AP_Houston,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "LOC_007": "OU=TX_xxxxxxxx,OU=AP_Austin,OU=Users,OU=Central_States,OU=AD,OU=Regions,OU=AP_Main,DC=AD,DC=com",
                "default": "other"
            }
       },
            "type": "lookup"
        },
        "location2": {
            "attributes":{
            "input": {
                "attributes": {
                    "attributeName": "REPORT_CATEGORY__c",
                    "sourceName": "Workday"
                },
                "type": "accountAttribute"
            },
            "table": {
                "0": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "Integrated": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "default": "OU=United_States,OU=Provisioned_Users,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com",
                "Non-Integrated": "OU=United_States,OU=Exclude_OKTA,OU=Ancillary_Services,OU=AP_Main,DC=AD,DC=com"
            }
        },
            "type": "lookup"
        },
        "value": "#if($locationlookup == 'other')$location2#{else}$locationlookup#end"
    },
    "internal": false
}
1 Like

Thanks for your help. I can see the values now!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.