How to compare string field with reference field in transform map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2021 11:29 PM
I have a field in Excel named "Schedule" it maps with "Schedule" in cmn_schedule_span table...
so here my issue is...
Suppose in Excel If I provide like "India Schedule" while transforming it is referring to "Schedule" which is a reference field due to this my transform map is not working...
so can anyone please explain how can we compare a string with reference field in transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:03 PM
Hi,
So it should be combination of Schedule + Start + End + Year
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:19 PM
Hi,
then can you try to use this combination then
Schedule + Start Time + End Time
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:28 PM
if I keep Schedule + Start Time + End Time as coalsece field then if three matches then only it is gettting updated other wise it is inserting new record...which won't satisfies my condition...
because as I am working on calendar update..
Independence day 15-08-2020 00:00:00 15-08-2020 23:59:59 (as of now)
it needs to update as
Independence day 15-08-2021 00:00:00 15-08-2021 23:59:59
in this scenarios if I use coalsece field as Schedule + Start Time + End Time then it will creating new record...but I need to update in these scenarios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:35 PM
Hi,
since there is change in the coalesce field value it will insert
So if you wish to change the value for the year I believe you will have to script it using transform map onBefore script and don't use any field map
1) query the target table with the schedule and find if the start date and the date from start time and same for end date are matching
2) if yes then update with the excel values
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader