Click HERE to see how Saviynt Intelligence is transforming the industry. |
01/31/2023 06:52 AM - edited 02/01/2023 05:46 AM
Hi All,
I need help in mapping nested & multivalued attribute in ImportUserJson's colsToPropsMap
This is the query which I have taken from SAP SuccessFactor Connector Guide - https://saviynt.freshdesk.com/support/solutions/articles/43000478793-sap-successfactors-connector-gu...
So when I use results[0] I am able to fetch results at the first place of solution array, but in our use case latest value is coming at the last place of result array and with this query 'empInfo/jobInfoNav/startDate+asc' we are not able to sort data with startdate(when data is updated), so my question is how to fetch value at last place of array.
NOTE: I have tried results[-1], results[-1:],results[length-1] but it doesn't work.
Please help.
Thanks,
Jaya
02/01/2023 02:17 PM
Let me check this and will update.
02/01/2023 03:45 PM - edited 02/01/2023 04:06 PM
Can you try this results[length()-1] or results[size()-1]
02/01/2023 07:30 PM
"companyname": "empInfo.jobInfoNav.results[empInfo.jobInfoNav.results.size()-1].companyNav.name~#~char"
02/02/2023 06:15 AM
Hi Sk/rushikesh,
I have tried all these 3 methods but I am getting value as Null.
I have attached the logs for your reference.
Thanks,
Jaya
02/02/2023 09:30 AM
Try below
empInfo.jobInfoNav.results[Integer.valueOf(String.valueOf(empInfo.jobInfoNav.results.size()-1))]
02/03/2023 05:46 AM
Still it's Null
PFA error message
02/07/2023 01:07 PM
Can you share a sample of the response text from Postman and the intended value we need to fetch.
02/07/2023 07:27 PM
"companyname": "empInfo.jobInfoNav.results[empInfo.jobInfoNav.length -1].companyNav.name~#~char"