and more in a single search tool across platforms. Read the announcement here. |
04/02/2023 11:41 PM
Hi,
I am facing an issue with the date format while importing user start and end date through Rest API from darwinbox application.
present date format reflecting in saviynt is as MM-DD-YYYY while importing date through Rest API
Userimport:
"date_of_joining": "11-16-2021".
But i want DD-MM-YYYY format to be reflected with the imported date.
How can we achieve this please suggest me.
Regards,
Harish
04/03/2023 12:32 AM
Please try
${if(user.startdate!=null){new java.text.SimpleDateFormat('YYYY-MM-dd').format(user.startdate)}else{''}
Refer to following forum post : https://forums.saviynt.com/t5/identity-governance/need-to-modify-the-format-of-the-attribute-user-en...
04/03/2023 02:04 AM
Hi @RakeshMG Thanks for the reply.
Where do i need to place the provided
${if(user.startdate!=null){new java.text.SimpleDateFormat('YYYY-MM-dd').format(user.startdate)}else{''}exactly
In Rest connector import user parameter.
"colsToPropsMap": {
"firstname":"first_name~#~char",
"lastname":"last_name~#~char",
"startdate":"date_of_joining~#~epochdate"
}
04/03/2023 04:41 AM
Please refer to following document
https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
In which you can use #CONST#
Sample to use #CONST# :
"email": "#CONST#${List responseList = response.empInfo.personNav.emailNav.results; int count = 0; int size = responseList.size(); Iterator iterator = responseList.iterator(); while (iterator.hasNext()){count++; Map dataMap = iterator.next(); if('312'.equals(dataMap.emailType)){return dataMap.emailAddress}else if(count == size){return null}}}~#~char"
So you can try as following :
"startdate":"#CONST#$xxxxxx
04/04/2023 11:25 PM
Hi @RakeshMG ,
I have followed same as you suggested after referring to the https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
i have given below
"colsToPropsMap": {
"state": "office_state~#~char",
"startdate":"#CONST#${List responseList = response.empInfo.personNav.emailNav.results; int count = 0; int size = responseList.size(); Iterator iterator = responseList.iterator(); while (iterator.hasNext()){count++; Map dataMap = iterator.next(); if('312'.equals(dataMap.emailType)){return dataMap.emailAddress}else if(count == size){return null}}}~#~char",
}
But i did not get connection success, syntax error.
also i tried with this
{
"globalSettings": {
"dateFormat": "yyyy-MM-dd"
}
But date format is not changed s expected.
Any other successfull solution is existed to sort it.
Regards,
Hareesh K