cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nintex forms replace function

Jump to solution

I need help with how to use the Replace function with a regular expressions?

replace(textToModify, replacePattern, replacement)

I need to strip the '2;#' from the following text, which is a calculated field:

2;#Submitted

The replacePattern is what I am struggling with, in JavaScript, the pattern would be /\d;#/g, but it doesn't work, and I can't seem to get the syntax right.

I am using SharePoint 2013 and Nintex Forms 2013.

Can anyone help?

Thanks in advance

Labels: (3)
Reply
11 Replies
Not applicable

Re: Nintex forms replace function

Jump to solution

Use the Regular Expression task:

Pattern: [0-9];#

Operation: Replace text

Replacement text: (leave this empty)

Input text: 2;#Submitted

Store result is: resultTextVar

0 Kudos
Reply
Not applicable

Re: Nintex forms replace function

Jump to solution

I am having the issue with nintex forms, not nintex workflow

0 Kudos
Reply
patrick_hosch
Nintex Newbie

Re: Nintex forms replace function

Jump to solution

use the following formula to remove the number(s), semicolon and hashtag: replace({YOURINPUTTEXT},"[0-9]*;#","")

Reply
Not applicable

Re: Nintex forms replace function

Jump to solution

Patrick Hosch​: Thanks! It did work.

0 Kudos
Reply
jharris73
Nintex Newbie

Re: Nintex forms replace function

Jump to solution

Thanks for the info Patrick.  I used your formula and it works for removing the characters.  However, in my situation I'm using my replace function on a SQL request action that is retrieving data from a SQL table.  

What else do I need to add to the formula to remove the repeated word?  Thanks in advance for your assistance.

0 Kudos
Reply
rameshmusham
Nintex Newbie

Re: Nintex forms replace function

Jump to solution

You can use parseLookup() to get the value in calculated column.

0 Kudos
Reply
nico1
Nintex Newbie

Re: Nintex forms replace function

Jump to solution

Hey!

I think I have a similar issue here. May be I'm just using a different syntax but I can't figure out how to change my patern so it works in the nintex control.

Here is the pattern I want to use: /(\(.+\))/g

I want to remove anything in between brackets. Do you think you can help me, please?

Thanks!

0 Kudos
Reply
furstlars
Nintex Newbie

Re: Nintex forms replace function

Jump to solution

Hello, I need to remove everything after "Text" in the following example. Basically everything in brackets. Can anyone help?

 

i.e. ---  Text (Text in brackets) > Text

 

The following expression works in workflow but not forms:

 

replace(parseLookup(WorkArea), " \(.*?\)","")

 

 

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Nintex forms replace function

Jump to solution

Hi,

If you need to remove everything after TEXT the following will work in forms

replace(inputString,"[^a-zA-Z\s][\(a-zA-z\s\)]*","")
0 Kudos
Reply