Any way to set Two coalesce field (For update check ,First || Second )?

sapna_sagar
Kilo Expert

In an import, coalescing on a field (or set of fields) means the field will be used as a unique key. If a match is found using the coalesce field, the existing record will be updated with the information being imported. If a match is not found, then a new record will be inserted into the database.

Is it possible that before insertion , It should check one more field and if match found then updated and not found then finally insert the record??

Means before insertion, It should check two field -

  1st (if not found ) then 2nd (if not found) then only insert.

8 REPLIES 8

OK..I"ll try CS.



Here is actual requirement:



We are importing data from AD and UserPrincipalName is Coalesce and based on we are insering/updating data.



Now sometime AD team update the   UserPrincipalName itself   then integration consider it new user and create one more record for a user who already in sys_user table during import.



Common thing in these two users are : except UPN , all field are same .



So i want planning to match one more field before insertion.


I ran in to a similar issue when I was a customer... We settled on using the employee ID as the de factor unique key for all users since name change, email address can change, etc. I recommend finding an authoritative source of information for employee records and get that in to AD (if that's where SN gets the information) and use that as your coalesce value. Keep the upstream data clean rather than trying to rectify it downstream.


It seems i found exact post for which i was looking for.



Example conditional coalesce scripts



find_real_file.png


Good to know. Thank you for sharing!