interview questions on import sets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 05:56 AM
Questions and interview based scenarios on import sets topics?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:38 PM
Did my reply answer your question?
Would you mind marking appropriate response as correct so that it benefits future readers.
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
07-21-2022 04:33 AM
In interview you have to tell this scenarios
Import data into user table using import set, when inserting data, we need to set userid and password at run time. Userid and password fields should not be present in the file. (UserID – corp/firstname.lastname, Password – pwd@+”1st letter of the name”+$”last letter of the lastname”, Eg – first name – abc, last name- pqr then password will be pwd@a$r)(Excel File Col – Firstname, Lastname, Email id) 10 user in files.
Firstly we have to import the data and map the field and as per the given condition we have write scripct
Run script:-
target.user_name = 'corp/' + source.u_first_name.toLowerCase() + '.' + source.u_last_name.toLowerCase();
var name = source.u_first_name.toString();
var fname = name.toLowerCase();
var lname = source.u_last_name.toString();
var fletter = fname.charAt(0);
var letter = lname.charAt(lname.length-1);
var pass = 'pwd@' + fletter + '$' + letter;
target.user_password.setDisplayValue(pass);