none
How to concatenate two fileds in a Workflow RRS feed

  • Question

  • I have a workflow that needs to fill a field with the contents of two fileds from the same "CurrentItem"

    In the "Value Assigment" dialog I try to put: [%CurrentItem:Field1%] & " - " & [%CurrentItem:Field2%]

    But it isn't valid. I try it on the String Builder and in the field "To this value".

    How can do it?

    Thanks for your time!


    Un saludo! Juan Segura
    • Moved by Clayton Cobb Thursday, October 21, 2010 8:02 PM Workflow question (From:SharePoint 2010 - General Questions and Answers)
    Thursday, October 21, 2010 7:14 PM

Answers

  • Use "Set a Workflow Variable," which gives you a Dynamic String Builder and puts the concatenated value into a variable that you can then use for input.  When using the dynamic string builder, you don't use functions nor special characters.  Just add the first field, then the text, then the other field.

    Workflow questions go either to the SPD forum (if it's an SPD 2010 workflow) or the Visual Studio forum (if it's custom coded).  I'm assuming this is SPD, so I'm moving it there.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Juan Segura Thursday, October 21, 2010 9:01 PM
    Thursday, October 21, 2010 8:01 PM
  • Remove the & from your string builder. It should just be [Varaible:var1%] [%Variable:var2%]

    • Marked as answer by Juan Segura Saturday, November 15, 2014 5:52 PM
    Thursday, August 30, 2012 2:53 PM

All replies

  • Use "Set a Workflow Variable," which gives you a Dynamic String Builder and puts the concatenated value into a variable that you can then use for input.  When using the dynamic string builder, you don't use functions nor special characters.  Just add the first field, then the text, then the other field.

    Workflow questions go either to the SPD forum (if it's an SPD 2010 workflow) or the Visual Studio forum (if it's custom coded).  I'm assuming this is SPD, so I'm moving it there.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force
    • Marked as answer by Juan Segura Thursday, October 21, 2010 9:01 PM
    Thursday, October 21, 2010 8:01 PM
  • It works!

    It's a SPD 2010 workflow question!

    Thanks for your response and sorry for the wrong forum.


    Un saludo! Juan Segura
    Thursday, October 21, 2010 9:02 PM
  • Hello Juan and Clayton!

    I am trying to do this as well but it just isn't working. I have a column named Description and a column named ID.  I want to set my workflow value to concatenate Description and ID.

    What exactly do I put in the string builder?  I just can't figure it out :(.

    And then once I get the variable set do I chooose "Update List Item" or do I choose "Set Field" in my next workflow step?  I want to update a column in my list with the variable's value above.  So confusing!

    Thanks for your help!


    michelle korb

    Tuesday, March 6, 2012 1:40 AM
  • Hi, I am trying to do the same but  cant concatenate the 2 variables. When I do [Varaible:var1%] & [%Variable:var2%] it gives me error.

    Any update? Thanks for your help.


    Cheers, R2C3 ----------------------------------- starting sharepoint :)


    • Edited by R2C3 Tuesday, April 17, 2012 8:13 PM
    Tuesday, April 17, 2012 8:07 PM
  • Remove the & from your string builder. It should just be [Varaible:var1%] [%Variable:var2%]

    • Marked as answer by Juan Segura Saturday, November 15, 2014 5:52 PM
    Thursday, August 30, 2012 2:53 PM
  • no it does not work like [Varaible:var1%] [%Variable:var2%], we have to do it like [Varaible:var1%]_[%Variable:var2%] with a underscore
    Wednesday, January 20, 2016 11:01 AM