obfuscate(
CLEARTEXT
)
The obfuscate( function randomizes the letters and digits in text.
Parameters
This function has one parameter:
cleartext – the text to be obfuscated.
Description
This function randomizes the letters and digits in text, leaving punctuation alone. The replacement isn’t completely random, however, vowels will be replaced with vowels, consonants with consonants, digits with digits, and lower vs. upper case will be preserved. Any diacritical marks will be removed from the text before randomization.
obfuscate("Mark L. Jackson") ☞ Mikk G. Murtlom
obfuscate("mark.jackson@gmail.com") ☞ sibk.vawxjup@kzuyv.hig
obfuscate("456 Market Avenue, Suite 802") ☞ 037 Porran Ehynya, Ryydy 711
Keep in mind that this function will return a different result each time you use it, even if you pass it the same original text.
obfuscate("Alîča S. Mathüs") ☞ Ejuly M. Cydcon
obfuscate("Alîča S. Mathüs") ☞ Ugaso X. Suchav
obfuscate("Alîča S. Mathüs") ☞ Oboza V. Cijfaf
obfuscate("Alîča S. Mathüs") ☞ Iruby T. Piftal
obfuscate("Alîča S. Mathüs") ☞ Yjyse N. Laktum
You may want to obfuscate the text sometimes but provide an option to temporarily make the text visible. You could create a variable to control this.
letpermenent showNames = false()
Then you could use a Text Display object to display the Name field of the database using this formula:
?(showNames,Name,obfuscate(Name))
If the showNames variable is true, the clear text will be displayed. If it is false, the text will be obscured. (Be sure to use the showvariables statement each time you change the value of the showNames variable.)
One problem with the formula above is that when using this formula, Panorama is actually taking the time to obfuscate the text every time, even when you are displaying the clear text. This revised formula eliminates that problem, so it will be faster if the text is large.
defaulttext(Name,obfuscate(Name[1,?(showNames,0,-1)])
Panorama also has a special function specifically for obscruring the digits of a credit card, see the obscuredigits( function.
See Also
- appendluhncheckdigit( -- adds a Luhn check digit to a series of digits.
- characterfilter( -- scans and filters text on a character by character basis.
- concatenate( -- concatenates two text strings (same as the + operator).
- connect( -- appends a prefix and suffix together with a connector in between.
- crtovtab( -- converts carrige returns (ASCII 0x0D) into vertical tabs (ASCII 0x0B).
- csvtotsv( -- converts comma separated text into tab separated text.
- defaulttext( -- returns a text value, or returns a default value if the text value is empty ("").
- fixedwidth( -- makes the text a fixed width, padding with spaces if necessary.
- fixedwidthright( -- makes the text a fixed width, padding on the left with spaces if necessary.
- linesort( -- sorts lines of text in ascending order.
- linestrip( -- removes any blank lines from the text.
- lower( -- converts text to lower case.
- makemergeformula( -- builds a formula from an “auto-wrap" style merge template.
- mixedupperword( -- converts lower case words to Initial Caps, but leaves mixed case words alone.
- obscuredigits( -- obscures digits in a number (usually a credit card number) with Xs.
- onespace( -- removes all leading & trailing spaces and any extra spaces between words, so that there is exactly one and only one space between each word.
- onewhitespace( -- removes all leading spaces and any extra whitespace between words, making sure that there is one and only one space between each word.
- padzero( -- makes the text a fixed width, padding on the left with zeros if necessary.
- quoted( -- returns a quoted version of the supplied text.
- removeprefix( -- checks to see if a text item starts with a prefix. if it does, the prefix is removed.
- removesuffix( -- checks to see if a text item ends with a suffix. if it does, the suffix is removed.
- rep( -- assembles a text item by repeating a smaller text item over and over again.
- replace( -- replaces text with new text.
- replacefirst( -- replaces the first occurence of some text with new text.
- replacemultiple( -- replaces multiple words and phrases in a text value.
- replaceword( -- replaces a word with a new word.
- replacewordexact( -- replaces a word with a new word.
- sandwich( -- assembles a text item from three smaller items.
- snip( -- removes (snips!) one or more characters from the middle of an item of text.
- straightquotes( -- converts any "smart quotes" in the text into straight quotes.
- stringreverse( -- reverses the order of a string of text characters.
- stripaccents( -- removes accents from any characters in the text.
- stripchar( -- extracts characters you don't want from a text item.
- stripdiacriticals( -- strips diacritical marks from text.
- stripprintable( -- strips non-printable characters from text.
- striptoalpha( -- removes everything but alphabetic letters from a text item.
- striptonum( -- removes everything but numeric digits from a text item.
- textfilter( -- scans and filters text on a character by character basis.
- textstuff( -- replaces one or more characters in the middle of a piece of text.
- titlecase( -- capitalizes first character of each word, but not articles, prepositions, and conjunctions under 5 characters (unless they are the first or last word in the text).
- trimstart( -- removes one or more characters from the start of the text.
- upper( -- converts text to UPPER CASE (all caps).
- upperword( -- converts text to Initial Caps.
- vtabtocr( -- converts vertical tabs (ASCII 0x0B) into carrige returns (ASCII 0x0D).
- yoke( -- appends two text items together, with a joiner between them if both are non-blank.
History
10.2 | New | New in this version. |