2

I have a choice field (allow multiple selection) in one of the list forms. I have a workflow that sends out an email when an item is added.

My code for the field in my workflow email is just a lookup of the field with a title before it - Choices: [%CurrentItem:Choices%]

I have tried both "As String" and "Choices, with Comma Delimited" options. But none gave the desired result because As String displays it as a string and Choice with Comma displays as item1,item2,item3.

Desired format in the email is item1, item2, item3. or item1 item2 item3

Is this possible?

Please suggest.

1 Answer 1

1

You can achieve this using "Replace substring in string" action. below are the steps.

  1. Create one local workflow variable
  2. set its value to current item choices.
  3. add "Replace substring in string" action.
  4. Specify "," (comma) in what to replace & specify ", "(space after comma) in replacement string
  5. done. use this variable in your email.

See below screenshot:

enter image description here

5
  • Hello Vishal, Thanks for your reply. I believe this should work but for some reason it doesn't work for me. I am not sure where i am going wrong. Choice columns has 3 choices (all text), so i created variable:chs data type as String. In the third line, Replace substring in string. I added Variable:chs return field As String/ Semicolumn Delimited. Both options din work. I added Variable chs/output to WF email and both variable doesn't hold any data in email. I have no idea what's going wrong. Can you please suggest? Commented Jul 31, 2017 at 15:21
  • Are u getting different result or getting any error? Commented Jul 31, 2017 at 15:26
  • I am not getting any data. I added Hello , [%Variable: Chs%], [%Variable: Output%] in WF email. The email i get just has Hello. No other data. Commented Jul 31, 2017 at 15:27
  • In 1st step, How u r returning the field ? return it as string & try Commented Jul 31, 2017 at 15:36
  • That's what i am doing. Returning chs variable as a string. Commented Jul 31, 2017 at 16:17

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.