Issue Exporting Transform Map with Coalesce Fields Defined in onBefore Script(Date Field Format Pblm

praveen_rongali
ServiceNow Employee
ServiceNow Employee

Hi Everyone,

I'm working on importing data into a target table using a Transform Map in ServiceNow. Here's the setup:

  • I'm using Flow Designer to trigger the import.
  • In the onBefore script, I’m performing a coalesce operation based on three fields: Product Code, Line Start Date, and Line End Date.
  • The onComplete script is used to capture relevant comments under a specific RITM.
  • All my code is captured under an Update Set.

The issue arises when I try to export the Update Set as XML. ServiceNow throws an error saying that coalesce field definition is mandatory, even though I’ve already defined the coalesce logic in the onBefore script.

Interestingly, the transform works perfectly when I rely solely on the onBefore script for coalescing. However, if I try to define coalesce fields directly in the Transform Map UI, it causes issues—particularly with date field formatting (e.g., Line Start Date and Line End Date).

My Questions:

  1. Is there a way to export the Update Set without explicitly defining coalesce fields in the Transform Map UI?
  2. Alternatively, is there a best practice for handling coalesce logic involving date fields to avoid format-related issues?
  3. Has anyone faced a similar issue and found a workaround?

Any insights or suggestions would be greatly appreciated!

0 REPLIES 0