Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

REST connector import colsToPropsMap question

Caesrob
Regular Contributor
Regular Contributor

ImportUserJSON:

{
"connection": "acctAuth",
"url": "https://{URL}/{page}/{page}",
"httpMethod": "GET",
"httpHeaders": {
"Accept": "*/*",
"Authorization" : "${access_token}"
},
"colsToPropsMap": {
"username": "eMailMetDomein~#~char",
"displayname": "achternaam~#~char",
"customproperty1": "stamnummer~#~char",
"customproperty2": "taal~#~char",
"firstname": "voornaam~#~char",
"preferedfirstname": "roepnaam~#~char",
"lastname": "achternaam~#~char",
"customproperty6": "eMail~#~char",
"email": "eMailMetDomein~#~char",
"secondaryEmail": "eMailPrive~#~char",
"secondaryPhone": "gsmNummer~#~char",
"customproperty3": "pingPingTag~#~char",
"customproperty4": "nfcCardId~#~char",
"customproperty5": "activatieWachtwoord~#~char",
"customproperty60": "inschrijvingen~#~longtext"
}
}

In this ImportUserJSON the displayname should be a combination of roepnaam and voornaam if roepnaam is not null, otherwise it should be achternaam + voornaam. How would we go about doing this?

2 REPLIES 2

manu
New Contributor III
New Contributor III

Hey @Caesrob,

 

Can you try this ?

"displayname": "#CONST#${String attr1 = response.roepnaam; String attr2 = reponse.voornaam; String attr3 = response.achternaam; if(attr1=null){return attr1+attr2}else{return attr3+attr2}}~#~char"

 

Thanks,

Manu Gupta

Caesrob
Regular Contributor
Regular Contributor

I tweaked your code a bit as there were some semicolons missing, but this works. 

Thank you.