Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6862 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm wondering whether anyone has tackled this problem: I am in the process of creating a portfolio of my work, and I want to make screen shots of the databases I've designed. However, I can't put out screenshots of my clients' confidential data.

In the past, I've taken the screen shots and smudged the data in an image program, but that looks crappy. I thought about running a Replace Contents command, but what I think would be really nicest was if I could find (or write) either a script or a custom function that would take the characters in a given field or even record, and randomly swap in new characters. Ideally, it would preserve word-breaks.

I am working on local copies of the data files, so I can do what I want with the data.

Any ideas?

Thanks,

David

Posted

What I'm looking for is something that'll quickly and easily gibberize the content. What I came up with on the fly are the following Custom Functions that I am running on the data several times:

greekify:

Proper(Substitute ( Lower(src); Middle ( src ; 1 + Ceiling((Random * Length(src))); 1 ); Middle("wrtypsdfghjklzxcvbnm"; Ceiling(Random *20); 1) ))

numify:

Substitute ( Lower(src); Middle ( src ; 1 + Ceiling((Random * Length(src))); 1 ); Middle("1234567890"; Ceiling(Random *10); 1) )

The first does letters and the second does numbers. Each of them selects a random character from the source, and swaps that with a randomly selected char from the second string. I omitted vowels because someone once told me that you can avoid random dirty words by excluding vowels.

Posted

hahahahaha, i love the whole "dirty" words avoison... i think you migh be right... though i think its for all words..except those with y's in them...

Posted

In case anyone is interested, I've tweaked my function.

First, I made it select the character to replace from within a word, which preserves the word boundaries. The first version found spaces, commas, and other characters and replaced them with letters, which altered the text but didn't give the sense of words.

Second, I made it recursive, so that one calculation could randomize multiple times. BTW, I know that I could eliminate the passnum variable, but can't get my head around the syntax that would eliminate it.

Feedback would be welcome!

Here it is:

/* Greekify - randomizes text to make it illegible while retaining word structure.

Passes tells the function how many times to run; passnum is the current pass through

Usage: Greekify(YourField; 6; 1) */

If(passes ≥ passnum;

Greekify(

Let(

[srcword = MiddleWords(src; Ceiling(Random * WordCount(src)); 1);

swtch = Middle(srcword; Ceiling(Random * Length(srcword)); 1);

rndnew = Middle("wrtypsdfghjklzxcvbnm"; Ceiling(Random *20); 1)];

Proper(Substitute(Lower(src); swtch; rndnew))

); passes; passnum + 1); src)

This topic is 6862 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.