Workday Multi-values attribute display issue

Hi All,

We have configure workday as auth source. We have a requirement to pull multiple non primary COMPANY_CODE, DEPARTMENT_ID attributes. I have added these fields into account schema and marked them as multi-valued. Added below xpath in source.

  "ADDITIONAL_COMPANY_CODE": "ns1:Worker_Data/ns1:Employment_Data/ns1:Worker_Job_Data[@ns1:Primary_Job='false']/ns1:Position_Organizations_Data/ns1:Position_Organization_Data[*]/ns1:Organization_Data[ns1:Organization_Subtype_Reference/ns1:ID[@ns1:type='Organization_Subtype_ID']='Company']/ns1:Organization_Code",
 "ADDITIONAL_DEPARTMENT_ID": "ns1:Worker_Data/ns1:Employment_Data/ns1:Worker_Job_Data[@ns1:Primary_Job='false']/ns1:Position_Organizations_Data/ns1:Position_Organization_Data[*]/ns1:Organization_Data[ns1:Organization_Subtype_Reference/ns1:ID[@ns1:type='Organization_Subtype_ID'] ='CC Number']/ns1:Organization_Code"

We can aggregate multiple values on the account. However, when I check, it appears as ‘[object Object]’ on the screen. When I click on the ‘View All’ link, it highlights below, opens a new window, and displays the correct value. What steps should I take to remove the ‘[object Object]’ so that all the values appear directly under the account attribute?

Hi @sagar_kamalakar Just an idea: try appending text()

ie

.../ns1:Organization_Code/text()

Hi @j_place Thanks for response.
I tried above but it didn’t work. My xpath returning same values as shown in screenshot. its showing first value and unable to iterate list of values.

Hi @sagar_kamalakar I think the XPath is returning an array of arrays. I can see that

Worker_Job_Data[@ns1:Primary_Job='false']

would produce an array.

Possibly

ns1:Position_Organization_Data[*]

is creating an array within the array.

Maybe try

ns1:Position_Organization_Data[1]

and see if it gives you what you want.