Need help in SAP SuccessFactor ImportUser Mapping

Jaya
Regular Contributor
Regular Contributor

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...

Jaya_0-1675258675910.png

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

@Nikitaj @rushikeshvartak 

Thanks
Jaya Karothia
8 REPLIES 8

sahil
Saviynt Employee
Saviynt Employee

Let me check this and will update.


Regards,
Sahil

sk
All-Star
All-Star

Can you try this results[length()-1] or  results[size()-1]


Regards,
Saathvik

rushikeshvartak
All-Star
All-Star

"companyname": "empInfo.jobInfoNav.results[empInfo.jobInfoNav.results.size()-1].companyNav.name~#~char"

Jaya
Regular Contributor
Regular Contributor

Hi Sk/rushikesh,

I have tried all these 3 methods but I am getting value as Null.

Jaya_0-1675347078007.png

Jaya_2-1675347289852.png

Jaya_1-1675347090277.png

I have attached the logs for your reference.

 

Thanks,

Jaya

@sk 

Thanks
Jaya Karothia

Try below 

empInfo.jobInfoNav.results[Integer.valueOf(String.valueOf(empInfo.jobInfoNav.results.size()-1))]


Regards,
Saathvik

Jaya
Regular Contributor
Regular Contributor

Still it's Null

PFA error message

Jaya_0-1675431966268.png

 

Thanks
Jaya Karothia

sahil
Saviynt Employee
Saviynt Employee

Can you share a sample of the response text from Postman and the intended value we need to fetch.


Regards,
Sahil

"companyname": "empInfo.jobInfoNav.results[empInfo.jobInfoNav.length -1].companyNav.name~#~char"