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
Put the lookup value inside a parseLookup() when adding it to a single line of text.
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 workflow
List query
For each action
Update Item
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.
Does this looks correct? Thank you!
Entire for each
Querying the list inside of the For Each
Filter inside of Query in For Each
Building the Hotel Name string
Building the Inn Code string
Updating the item
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.
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
Okay, so we're getting closer. Below is the result in SharePoint
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