Nintex Responsive Form - Replace() Function

  • 23 June 2018
  • 2 replies
  • 28 views

Badge +5

Hello,

I have a Nintex Form, and I need to extract a portion of a text? The format of the text is as follows; "12345;#4 Information Technology"

How do I extract the ";#4 Information Technology" out of the text above?


2 replies

Userlevel 5
Badge +14

do you really want to get  ";#4 Information Technology" with leading ";#"?

it looks to me you're trying to process lookup field/control value. if so look on parseLookup() function, it picks either ID or text value out of lookup value

https://help.nintex.com/en-US/nintex2013/help/#Forms/RootCategory/Designer/Nintex.Forms.LookupFunction.htm%3FTocPath%3DF… 

Badge +5

That was the first thought, to use parseLookup() function. However, I believe this was not available for me.

Instead, I created a form variable, that uses the replace() function with a regular expression of ";.*$"

replace(sqlrequestformcontrolname, ";.*$", "")

The intent of replacing text starting at the semicolon, is so that I can extract the ID. In which, 12345 is the ID for the Information Technology display value.

Not entirely sure why parselookup was not available or didn't look into it further after I got the replace function to work.

Reply