Remove Term Store ID from Variable

  • 12 January 2018
  • 4 replies
  • 6 views

Badge +3

I am designing a workflow that successfully pulls in a text field "Primary Service" but seems to also include what I presume to be the Term Store ID of the value. (The list uses the term store for that field.)  Common among all results is the presence of a pipe ( | ) followed by information I don't need.

Because Primary Service will be variable in length, I cannot seem to use the fn-remove(). If there was a way to count the characters beforehand I suppose I could make this work but I can't find a facility to help with this.

1. What would be the best approach to address this problem? (I found similar examples but none specific to this one.)

2. If the remove() function is still a possibility (or other function), is there a "and follow" character that would allow me to delete everything to the right of and including the pipe?

This is my first foray into using inline functions so detail is welcome.


4 replies

Userlevel 5
Badge +14

at what place do you need to remove part of the string, resp. how do you populate the text box?

the point behind the question is whether you could use runtime function replace() instead of inline functions fn-remove() / fn-replace().

runtime function supports regular expressions which could easily do the job.

Badge +3

For clarity and future reference:

  • The (single line of) text field in the list is selected by a user when creating the list item. The choices are built from the term store. 
  • When a simple "set variable" is performed on this field, the value contains both the true value (in this case, Service Name), a pipe "|", immediately followed by what appears to be the Term Store ID.
  • Example:  Business Transformation|0e302020-18a7-46da-8592-e87529a331b8
  • Objective:  Remove the pipe and everything after it, leaving only the service name
  • Usage:  Pulling this information is part of a loop that gathers specific information from a list where specific criteria is applied, so Service Name will vary and its character length is not set.

I will look into your suggestion and see how that works out. Regular Expression info:

https://help.nintex.com/en-US/o365/o365/O365WorkFlow/WorkflowActions-STD/RegularExpression.htm

 

Userlevel 5
Badge +14

ok, then as I advised use regular expression action

following pattern should do the job

|.*$‍

212138_pastedImage_1.png

‌    ‌ term set‌

Badge +3

Success. Of course, I replaced the input text with the variable of the same that I set as the action preceding this one. Worked like a champ.

Reply