Solved

Remove special characters from lookup field

  • 11 June 2019
  • 7 replies
  • 35 views

Hey there,



I am trying to get the text value from a lookup field (this is looking up another SharePoint list) without the special characters in the value.



I used a calculated field to get the value from the Project Name field however I don't want the 1;# special characters in the value that I want to write to the SharePoint list.



Is there a way I can remove these values, preferably within the form, or within a workflow?



Below is the value I am dealing with.



Appreciate the assistance on this.





 



 

icon

Best answer by jackgelo 12 June 2019, 15:24

View original

7 replies

Hi,



 



yes, you can do that using parseLookup function..



 



with parseLookup(namedControl) you'll get the text value of the lookup while with parseLookup(namedControl,false) you'll get the ID of the selected item (that is shown before ;# in your screenshot)



 



Giacomo

Hey @jackgelo



thank you so much for the solution you provided. The solution was perfect with a slight change.



I think it was the way I wrote my initial request but I only wanted the text value, none of the special characters or ID, but what I did was use your solution but changed the value to true as displayed below.





  • Get text value only: parseLookup(namedControl,true) 




 



Again I appreciate the quick response and helping me learn a little more about Nintex! :smileyhappy:

Hi,



 



usually it would work also without the true parameter, but effectively I can remember some cases where I have to put it, while when I need the output with false parameter then it's always required..



 



Glad to know you've solved your issue! :smileyhappy:

Thanks for pointing that out to me. I will keep an eye on it, so I’m not caught out.



Again thank you, the client is now completely happy with their solution.

Hi @jackgelo ,



This solution is not working on my form. I originally had the parselookup(namedControl, false), "Owner" and that displayed an ID followed by ;# Owner . However, when I remove the word false, it doesn't return anything. 



 



Let me know if you need more information. 



Thank you!

Hey Iswank,
I am not sure if this will help you but in my solution I had to use True.
Does that change it for you?
Hey,
Apologies for the delayed response. That didn't change things for me, but I am having someone at work help me out with the solution. I tried using nothing and I tried using the word "True".

Reply