06/07/2023 01:33 AM
Currently we are storing two different attributes(suppose firstname & lastname) from a source application to two different Saviynt custom attributes(CP49 & 50).
"customproperty49": "employmentNav.empJobRelationshipNav.results[0].relUserNav.firstName~#~char",
"customproperty50": "employmentNav.empJobRelationshipNav.results[0].relUserNav.lastName~#~char"
FYI - we have used REST connector for integration & these mapping are under 'colsToPropsMap' of ImportUserJSON.
So my query is how can I store these two different attributes in a single Saviynt attribute with space in between(For Ex- Firstname(space)lastname).
Thanks
Jaya Karothia
06/07/2023 09:13 AM
You can use a format as below for this. Please ensure to update the response path depending on how your target app presents the data.
"displayName": "#CONST#${response.userKey != null? response.'firstname'+' '+ response.'lastname' : null}~#~char",
06/08/2023 04:00 AM
Hi sahil,
Can you please help me to write this with below path-
currently we are using this in CP49 & 50
"customproperty49": "employmentNav.empJobRelationshipNav.results[0].relUserNav.firstName~#~char",
"customproperty50": "employmentNav.empJobRelationshipNav.results[0].relUserNav.lastName~#~char"
I tried it by writing it in this format but i am getting syntax error msg
Thanks,
jaya
06/08/2023 10:08 AM
Please share the format you used and also the response you get for the api call.
06/09/2023 04:04 AM
06/09/2023 08:51 AM
You can try with below and see if it works.
"#CONST#${response.'employmentNav.empJobRelationshipNav.results[0].relUserNav.firstName'+' '+ response.'employmentNav.empJobRelationshipNav.results[0].relUserNav.lastName' : null}~#~char"
06/12/2023 03:19 AM
It is updating same query in the attribute not value. PFB Screenshot.
06/12/2023 03:43 AM
"#CONST#${response.employmentNav.empJobRelationshipNav.results[0].relUserNav.firstName+' '+ response.employmentNav.empJobRelationshipNav.results[0].relUserNav.lastName : null}~#~char"
06/12/2023 04:12 AM
Same problem now it is saviynt without single quotes -
06/12/2023 09:31 AM
Can you try with the below and see if it works. Also please confirm if you map just firstname, is it getting stored in the CP attribute?
"#CONST#${String data1 = employmentNav.empJobRelationshipNav.results[0].relUserNav.firstName; String data2 = employmentNav.empJobRelationshipNav.results[0].relUserNav.lastName; ret = data1 +' '+ data2; return ret}~#~char"