Script for data scrambling in non production instances

Divya Dattatra2
Giga Contributor

Hi,

Can anyone help me with the post cloning script for data scrambling in non production instances.

Thanks in advance!

1 ACCEPTED SOLUTION

VigneshMC
Mega Sage

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

View solution in original post

10 REPLIES 10

Tobias Breuer
Tera Expert

Hi Divya,

 

although you already found a solution I want to point out that we (agineo) have a dedicated app in the ServiceNow store for this use case. It's called Anonymize Me and offers even some more functionality. 

Just leave me a quick message if you have any questions.

 

Kind regards,
Tobias