Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create OLA using transform map

Debasis Pati
Tera Guru

Hello Team,

I have an excel sheet of group record data.I want to create one one individual ola record for each group .
My group data is as follows

NameTypeLine / Vendor ManagerDescriptionGroup emailVendors
FITincident, request, problem, changeAcerFIT support groupfitdesk@test.com 
IT SERVICE DESKincident, request, problem, changeAdobe SystemsIT SERVICE DESK groupitservice-desk@test.com 


the below is my ola conditions how it should be created

TitleNameDuration TypeDurationSchedule sourceScheduleTimezone SourceTargetTypeTableStartPauseWhen to ResumeStopWhen to CancelRetroactive StartSet Start toRetroactive PauseSLA Breakdown Config (Assignment Group and Assign to)

 Resolution OLA

Team1-FulfillmentUser specified durationBreached on 'Due Date'SLA definition8-6 weekdaysThe caller's time zoneResolutionOLAsc_taskActive = true  State = Closed CompleteState = Closed Incomplete OR Closed SkippedYesCreatedN/ATRUE
AND Assignment group  = Team1
AND Assignment group.Vendor is Empty



Now instead of Team1 it should replace the group name for example "FIT" is my group's name.
also in condition also it should build active true assignment group is fit like that.

I want to use transform map and create bulk ola records.
what approach i should do to get his done.

@Ankur Bawiskar any suggestions?





6 REPLIES 6

in my upload excel sheet we do not have all the fields we only have name and in target field we have logic only to set those fields as you have explained.

DebasisPati_0-1765353232160.png


what i should set without the source field match i can't save and can't create field maps.

@Debasis Pati 

then have field map only for name

then handle every other field in onBefore transform script and set the target field

something like this

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    // Add your code here
    var condition = 'active=true^assignment_group=b85d44954a3623120004689b2d5dd60a^EQ^';

    // if you know group sysId then use that or dot walk to name field

    //var condition = "active=true^assignment_group.name=FIT^EQ";
    target.setValue('start', condition);

})(source, map, log, target);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader