Skip to main content
Nintex Community Menu Bar

How to concatenate a string to a field

  • Feb 17, 2017 5:35 PM UTC
  • 9 replies
  • 712 views
  • Translate All

Forum|alt.badge.img+1

Hello,

I am trying to concatenate a string to a field and It has been a challenge. All I want to do is add the string "100", for instance, at the beginning of the  employee ID. This string will be placed under the employee ID column on the list when the Nintex form is submitted..

I have tried to create the employee ID field as a calculated field and use the concatenate formula to add "100" to the beginning of the employee ID, but it does not work.

I have also created variables and modules within the Nintex workflow (Query list, set field value, reg expression) and it's still not working.

What am I doing wrong? Any help would be appreciated. Thanks!

9 replies

Forum|alt.badge.img+16

What field type is employee ID? 

Translate

Forum|alt.badge.img+1
  • Author
  • Feb 17, 2017 6:02 PM UTC

The field is a text field but I used a reg expression to only enter 5 numbers.  No calculations or incrementing are involved. Just a 5 digit department number.

Translate

Forum|alt.badge.img+16

And you want to do this in your form or in the workflow? 

Translate

Forum|alt.badge.img+1
  • Author
  • Feb 17, 2017 6:17 PM UTC

The process goes like this:

I created a list, created the workflow and variables and the nintex form was created.

To use the department number field as an example. When the user/requestor enters info on the form, the info is placed under the corresponding list column (e.g., department number entered on the form goes under the department number column of the list).

What I want to achieve is to add/concatenate the number "100" before the department number. For instance if the department number is 23456, I want "100" placed before it (e.g.10023456). this should be consistent for all department numbers entered.

Translate

Forum|alt.badge.img+16

Okeydokey so I had a quick play and here is what I did:

  • Column name:  DeptNo = Single Line of Text
  • Nintex Form:  disconnected single line of text control called "InitialDeptNo" added to the form to capture user input for DeptNo
  • Nintex Form:  calculated value control called "DeptNoConcatenation" set up as follows:
  • Nintex Form:  "DeptNoConcatenation" connected to "DeptNo" column in list

Just ran a test, inserted as a user department number 23456 and list saved 10023456.

Translate

Forum|alt.badge.img+6

Hey ,

         Please check this   

Regards

Bashya Rajan A

Translate

Forum|alt.badge.img+10
  • Nintex Partner
  • Mar 14, 2017 8:35 AM UTC

I tried this too, and it is working as long as I am not hiding the calculated value field (visible = no).

Is there any possibility/best practice to do so?

Translate

Forum|alt.badge.img+16

hmmm not sure about best practice but I would normally "send to back" this field behind something else so that I don't have set visible = no.  seems a bit "fudgey" but it works.

Translate

Forum|alt.badge.img+10
  • Nintex Partner
  • Mar 14, 2017 3:55 PM UTC

Yeah, I was already considering that approach. But I thought there would be something more... elegant. happy.png

Translate