
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2019 01:01 AM
Hi,
Can anyone help me with the post cloning script for data scrambling in non production instances.
Thanks in advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2019 01:46 AM
Got this from stackoverflow. you can use normal GlideRecord and use this function to scramble text wherever needed
function shuffelWord(word){
var shuffledWord = '';
word = word.split('');
while (word.length > 0) {
shuffledWord += word.splice(word.length * Math.random() << 0, 1);
}
gs.print (shuffledWord);
}
shuffelWord("test test");
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2019 01:07 AM
Hi Divya,
Can you explain in detail what is exactly needed?
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
‎08-05-2019 01:17 AM
Hi Ankur,
Thanks for responding.
post cloning to the non production instances i want to scramble the data from some tables for eg., email id of users. i.e., if email is 'xyz@abc.com' then after scrambling it should be 'yzx@cab.com' (somethng like that). So that we can secure the client's confidential data.
We can do this via post cloning script but i need help in the scripting part.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2019 01:27 AM
Hi Divya,
For which all tables you want to do this?
Is it consistent that you will be scrambling in similar manner i.e. pattern will be same or change based on table
What is the purpose of secure client's confidential data?
you can secure data or records in servicenow using ACLs, query business rules etc
what is your exact use case here?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
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
‎08-05-2019 01:34 AM
We want to secure client's data from our team itself. ACL is not the approach that team wants to follow. pattern will be same for all the tables.
Thanks!