About Coalesce field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2023 08:06 AM
I have 3 fields in field map : userid, employeeid and off-board date
userid and employeeid are coalesce
How can i use status_message = 'user id and employee id are empty' in case both fields are empty
Thanks for answering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2023 09:05 PM
HI @ducdat2406 ,
I trust you are doing great.
You can write Business Rule for the same.
Please find the code for the same.
(function executeRule(current, previous /*null when async*/) {
// Check if both userid and employeeid are empty
if (!current.userid && !current.employeeid) {
current.status_message = 'user id and employee id are empty';
}
// Else, you can add additional logic here if needed
})(current, previous);
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2023 11:47 PM
Actually your solution quite good, but i want to do it in transform script instead of business rule. Do you have any solutions else ?