Skip to main content

I am using a calculated value to populate the name from another sharepoint list. It returns the name but with the prefix “6;#” so how do i get rid of that?  

lookup("siteURL|Workflow Configuration List", "Title", "Advansys Manager", "Person")

Hi @dpstear 

You can use either the REPLACE or SUBSTRING functions

 

REPLACE Example 

Text Source → lookup("siteURL|Workflow Configuration List", "Title", "Advansys Manager", "Person")
Expression → “6;#”
Replacement → “”   

 

replace( lookup("siteURL|Workflow Configuration List", "Title", "Advansys Manager", "Person"), “6;#”, “”)

Searching for “6;#” and replacing with empty string.


 

https://help.nintex.com/en-US/office365/Designer/Functions/replace.htm

 

 https://help.nintex.com/en-US/office365/Designer/Functions/substring.htm

Hope that helps


Thanks Garret, that worked! Actually both ways work but sometimes the first digit (the 6 in my example) is not always a 6 and sometimes it’s a 2 or 3 digit number so how would I remove that?

Thanks for your help!


Hi @dpstear 

 

Use the REPLACE function which supports Regular Expression or REGEX

Text Source → lookup("siteURL|Workflow Configuration List", "Title", "Advansys Manager", "Person")
Expression → "\\d{1,3};#"
Replacement → “” 

 

replace( lookup("siteURL|Workflow Configuration List", "Title", "Advansys Manager", "Person"), "\\d{1,3};#", “”)

 

The Expression will search for → between 1 to 3 digits

;#Garrett → ;#Garrett     //No match
3;#Garrett → Garrett
23;#Garrett → Garrett
123;#Garrett → Garrett
0123;#Garrett → 0Garrett 

 

Hope that helps


Thanks so much Garrett, that works perfectly!


Hi,

You can also use the function ‘ParseLookup’

https://help.nintex.com/en-US/office365/Designer/Functions/parseLookup.htm

 

This function is here o remove this special extra characters ;)

 

For exemple : 

parselookup(lookup('MyList','ID',3,'Author'))

 


Reply