- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 06:43 AM
Hello Experts,
I am trying to import user data using import sets from xls file. I am using a script in the transform map variable mapping to generate password but that's not working. Could you please suggest, where I am doing wrong?
Script
var FN = source.u_first_name.toString();
var LN = source.u_last_name.toString();
var firstLength=FN.length;
var secondLength=LN.length;
target.user_password=FN.charAt(0).toUpperCase()+firstLength+FN.charAt(firstLength-1)+LN.charAt(0).toUpperCase()+secondLength+LN.charAt(secondLength-1);
Also attaching transform map screen shots FYR.
Thanks
Pavan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2016 01:17 AM
Guys,
The below script works for setting password using script while importing user profiles from import sets.
var FN = source.u_first_name.toString();
var LN = source.u_last_name.toString();
var firstLength=FN.length;
var secondLength=LN.length;
var pwd=FN.charAt(0).toUpperCase()+firstLength+FN.charAt(firstLength-1).toLowerCase()+LN.charAt(0).toUpperCase()+secondLength+LN.charAt(secondLength-1).toLowerCase();
answer=pwd;
Not sure why they are using answer!!! Below link will helpful.
http://www.snc-blog.com/2013/11/05/importing-users-with-password/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 08:41 AM
Hi Tony,
Tried the same but that's not working.
Thanks
Pavan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2016 01:17 AM
Guys,
The below script works for setting password using script while importing user profiles from import sets.
var FN = source.u_first_name.toString();
var LN = source.u_last_name.toString();
var firstLength=FN.length;
var secondLength=LN.length;
var pwd=FN.charAt(0).toUpperCase()+firstLength+FN.charAt(firstLength-1).toLowerCase()+LN.charAt(0).toUpperCase()+secondLength+LN.charAt(secondLength-1).toLowerCase();
answer=pwd;
Not sure why they are using answer!!! Below link will helpful.
http://www.snc-blog.com/2013/11/05/importing-users-with-password/