do over — text permutations

Like Mail Merge, but for text.

Examples

Simple Index

You can add an index.

Action/Field Value/Setting
S
T
E
P

1
Values
apple banana coconut
Delimiter space
Template
?i. ?
Placeholder ?
Joiner space
Result
1. apple 2. banana 3. coconut

Changing Case

You can easily change casing of value elements.

Action/Field Value/Setting
S
T
E
P

1
Values
APPLE Banana coconut
Delimiter space
Template
Uppercase: \U?, Capitalized: \u?, Lowercase: \L?
Placeholder ?
Joiner new line
Result
Uppercase: APPLE, Capitalized: Apple, Lowercase: apple
Uppercase: BANANA, Capitalized: Banana, Lowercase: banana
Uppercase: COCONUT, Capitalized: Coconut, Lowercase: coconut

Escaping Placeholders

In the event you need to use the placeholder value in the template itself, you can do so by prefixing the placeholder with \.

Action/Field Value/Setting
S
T
E
P

1
Values
APPLE Banana coconut
Delimiter space
Template
SUM(_) AS var\__i
Placeholder underscore
Joiner new line
Result
SUM(APPLE) AS var_1,
SUM(Banana) AS var_2,
SUM(coconut) AS var_3,

Coding 1

Quickly build out where conditions in SQL

Action/Field Value/Setting
S
T
E
P

1
Values
spend|impressions|clicks|conversions|transactrions|revenue
Delimiter pipe
Template
([x] IS NOT NULL)
Placeholder [x]
Joiner and
Result
(apple IS NOT NULL) and (banana IS NOT NULL) and (coconut IS NOT NULL)

Coding 2

Create new variables in SQL (and adjust the index start)

Action/Field Value/Setting
S
T
E
P

1
Values
spend|impressions|clicks|conversions|transactrions|revenue
Delimiter pipe
Template
SUM(?) AS fruit_?i \i-1
Placeholder ?
Joiner comma
Result
SUM(apple) AS fruit_0 , SUM(banana) AS fruit_1 , SUM(coconut) AS fruit_2

Chaining Permutations

Feed the output of one permutation into another permutation. Here is a shortcut demonstrating this.

Action/Field Value/Setting
S
T
E
P

1
Values
apple banana
Delimiter space
Template
? is not _
Placeholder ?
Joiner and
S
T
E
P

2
Values
banana coconut
Delimiter space
Template
(results of step 1)
Placeholder underscore
Joiner or
Result
apple is not banana and banana is not banana or apple is not coconut and banana is not coconut