Skip to main content
Nintex Community Menu Bar

I recently needed a String-Repeat function in a workflow. But it doesn’t exist.

Or does it?

Looking at the inline function specifications, I saw that the PadLeft function (and PadRight) adds a number of characters to a string, until the string length is the desired number of characters long.

If you needed just a specific number of characters (lets say ‘-‘ chars), then the following

fn-PadLeft(-,15,-)

 

Will result in a string of 15 ‘-‘ characters

Now, you cannot tell it to pad out with a string of more than 1 character (it actually returns the text of the function definition when you try), so you need to be a little more clever to give a string of 15 repetitions of ‘Graham’ for example

We create a string of 15 ‘-‘ characters then replace each ‘-‘ with the longer text that we want to repeat in a RegEx task.

Be the first to reply!

Reply