Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/31/2024 09:11 AM
Hi Team,
We have a SuccessFactors integration to reconcile the users for provisioning. In which we mapped a customproperty as below.
"customproperty40": "emplStatusNav.picklistLabels.results[0].label~#~char",
We used to have english value in the above field (results[0]) . other results are in different languages upto result[10].
Now SuccessFactors is upgraded and after that english value is being rotated between results[0] to results[10] and it is not fixed. We need to reconcile the english value only. Below is the two sample results from postman
{
"__metadata": {
"uri": "https://*url*/odata/v2/PicklistLabel(locale='sv_SE',optionId=31139L)",
"type": "SFOData.PicklistLabel"
},
"label": "Aktiv"
},
{
"__metadata": {
"uri": "https://*url*/odata/v2/PicklistLabel(locale='en_US',optionId=31139L)",
"type": "SFOData.PicklistLabel"
},
"label": "Active"
}
Can you please advice.
05/31/2024 09:32 AM
"customproperty40": "emplStatusNav.picklistLabels.results[10].label~#~char",
05/31/2024 09:38 AM
Hi Rushikesh,
In results[10] also english value wont be there. It is random in between 0 to 10.
06/03/2024 08:04 PM
Use if else / ternary operation using #CONST and validate if 0 is null then go 1 till 10
06/04/2024 03:12 AM
Hi Rushikesh,
Thank you for the reply, we have used #CONST and tried importing the data. Job ran for 1 hour and failed with below error
"Error in Users Import - Error while processing data: Data truncation: Data too long for column 'CUSTOMPROPERTY1' at row 1"
Please find the mapping which we updated
"customproperty1": "#CONST#${List accounttype=response.employeeClassNav.picklistLabels.results; int count=0; int size=accounttype.size(); Iterator iterator=accounttype.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",
"customproperty40": "#CONST#${List empStatus=response.emplStatusNav.picklistLabels.results; int count=0; int size=empStatus.size(); Iterator iterator=empStatus.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",
Could you please suggest.
06/04/2024 03:34 AM
@SaiKiran try use map cp60 check
"customproperty60": "#CONST#${List accounttype=response.employeeClassNav.picklistLabels.results; int count=0; int size=accounttype.size(); Iterator iterator=accounttype.iterator(); while(iterator.hasNext()){count++; Map dataMap = iterator.next(); if(dataMap.__metadata.uri.contains('en_US')){return dataMap.label}else if(count==size){return null}}}~#~char",