Skip to main content
Nintex Community Menu Bar
Solved

Extract a substring from the end of a string and save as a variable in Nintex Forms.

  • December 20, 2023
  • 2 replies
  • 165 views

Forum|alt.badge.img+1

Hello,

I have a form for a SharePoint list which collects information about travel requests.  One of the fields is for an Admin Code (AC), and another is for a Common Account Number (CAN) which is basically a bank account number.  Each AC has it’s own set of CANs.
In order to make things easier on the users, I created a second list which contains the ACs and CANs and I have those as cascading dropdowns in the form.  For some reason it’s adding a number and # before the AC and before the CAN. 

In order to get the correct AC and CAN in the original list, I had to create a variable to extract the last portion of the string.

The problem I’m having is that some of the numbers being inserted are only one digit.

On those items, the variable I created is starting the extraction count at 4 when (on these specific items) it should be starting the count at 3.

Is there a way to get the end of the substring to start after the # sign?

 

Best answer by Garrett

Hi @Duer 

Use the parseLookup() function to strip the the correct values.
Using Replace with Regular Expression also works.

 

2 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • 903 replies
  • Answer
  • December 20, 2023

Hi @Duer 

Use the parseLookup() function to strip the the correct values.
Using Replace with Regular Expression also works.

 


Forum|alt.badge.img+1
  • Author
  • Novice
  • 1 reply
  • December 20, 2023

Perfect!  Thank you for the quick reply!