cancel
Showing results for 
Search instead for 
Did you mean: 
chubacher85
Nintex Newbie

Removing ID and # sign from single line of text field

I used a site workflow to copy the values of two lookup fields to two single line of text fields so that I can delete the lookup fields. The site workflow updated the text fields but the values have an ID and # characters included before each. I was looking for a way to run a site workflow or list level workflow that would remove those values and leave only the intended text values. I assume it would involve  a regular expression function but I have not been able to figure it out the last few days.  Any help would be greatly appreciated.

 

Thanks,

Carl

Labels: (1)
0 Kudos
Reply
10 Replies
jpmhuls
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Put the lookup value inside a parseLookup() when adding it to a single line of text.

Reply
chubacher85
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Thank you for your reply. Below are some screenshots of my site workflow that I used to update the text fields. I'm not sure how I would do that with this current set up. Thanks for your help, I have been stuck on this for a few days.

 

Site workflowSite workflowList queryList queryFor each actionFor each actionUpdate ItemUpdate Item

0 Kudos
Reply
jpmhuls
Nintex Newbie

Re: Removing ID and # sign from single line of text field

In the Foreach you need to query the lookup fields for the current item and store them temporarily in a workflow variable. Next use a Set variable or Build string action to convert the lookup value workflow variable using parseLookup into a text workflow variable; you could consider to construct the entire string you want to use in the update. In the Update item use the workflow variable instead.

Reply
chubacher85
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Does this looks correct? Thank you!

 

 

 

 

Entire for eachEntire for eachQuerying the list inside of the For EachQuerying the list inside of the For EachFilter inside of Query in For EachFilter inside of Query in For EachBuilding the Hotel Name stringBuilding the Hotel Name stringBuilding the Inn Code stringBuilding the Inn Code stringUpdating the itemUpdating the item

Reply
jpmhuls
Nintex Newbie

Re: Removing ID and # sign from single line of text field

That looks about right. Reusing the workflow variables is a good practice. Go ahead and test if this works correctly. If you do not yet want to update the item you can always first write each text.... workflow variable into the workflow history and confirm that it is now proper text.

Reply
chubacher85
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Haven't been able to get it to work just yet. Question, will this update the text fields even if they still have a value in them from a previous workflow? I think it will but just wanted to be sure that wouldn't be a reason for it not to work.

 

Thanks,

Carl

0 Kudos
Reply
chubacher85
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Okay, so we're getting closer. Below is the result in SharePoint

 

Capture.PNG

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Removing ID and # sign from single line of text field

The parselookup inline function is not available in the build string action. You may need to use a regular expression to remove the unwanted characters. If you provide an example of the output you are seeing I can show you how to configure the regular expression action to remove the unwanted characters.
Reply
chubacher85
Nintex Newbie

Re: Removing ID and # sign from single line of text field

Hey Simon,

 

Thanks for the reply and sorry for the delay, had a bunch of other things come up. I'm still experiencing this problem and wondered if you could help. The output I get currently when following the instructions above (minus the parseLookUp for now), looks like 

104;#HH Washington
 and I would like to remove the ID, semi colon and number sign from in front the name of the property. Thanks for any and all help.
 
Thanks,
Carl
0 Kudos
Reply