We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to insert only one record in target table using transform map

sunil10
Tera Contributor

Hi Everyone

I have a simple requirement i have a excel sheet(Attached) 38 rows. When i am importing the data through transform map i want only one record to be inserted whose total is maximum. Please help

7 REPLIES 7

Hi Ankur,

That is how the requirement is . There could be more than one rows in the sheet, but in target table we want only one row to be inserted whose total value field column has maximum value(eg: in the sheet max value is 48.8 so only that record should be inserted remaining should be skipped)

Hi @sunil10 ,

 

Are you storing this max value anywhere on the target record?

 

Thanks,

vermaamit16
Kilo Patron

Hi @sunil10 

 

Have you gave a thought on onBefore script ? Please refer below posts and see if it helps :

https://www.servicenow.com/community/developer-forum/conditionally-update-only-one-field-map-in-a-tr...

https://www.servicenow.com/community/itsm-forum/send-the-data-to-target-table-based-on-condition-is-...

 

Thanks & Regards

Amit Verma

Thanks and Regards
Amit Verma