none
SharePoint Designer Workflow setting Hyperlink Field in List RRS feed

  • Question

  • In the workflow I want to set the hyperlink field.  I want to set the description to text and the url, but this is not an option from what I can see.
    • Moved by Mike Walsh FIN Thursday, January 29, 2009 9:44 AM wf q (Moved from SharePoint - Design and Customization to SharePoint - Workflow)
    Saturday, April 7, 2007 7:48 PM

Answers

  • You can set the hyperlink field by using a string variable and use a 'dynamic string build' action.

    1. From a WorkFlow Designer window, click "Variables..." button, and add a variable with String type. Let's name the variable 'CustomLink'

    2. Click 'Actions...' button, choose 'more actions...', and select 'Build Dynamic String' action.

    3. On the build dynamic string action, click 'dynamic string' link to open a String Builder window. Construct a string. Typical formating should be something like:

    [%Contacts:HomePage%], [%Contacts:FullName%].

    If you'd like to display email link the formating should be something like:

    mailto:[%Contacts:Email%], [%Contacts:FullName%].

    4. On the build dynamic string action, set the variable to the new variable that you created from step 2.

    5. Now click 'Actions...' button, and add 'Set Field in Current Item' action.

    6. Set the 'field' to the Hyperlink field that you'd like to update through workflow

    7. Set 'Value' by configuring Source to Workflow Data and Field to the new variable that you created from step 2.

    8. Click 'Finish' to close the workflow.

     

    I hope this will help.

     

    • Proposed as answer by kalyan93 Thursday, January 29, 2009 9:23 AM
    • Marked as answer by Mike Walsh FIN Thursday, January 29, 2009 9:44 AM
    Monday, April 9, 2007 10:09 PM
  • Thanks so much, very helpful, I had the requirement of adding the subject line to the email so I used the following:

    mailto:[%Contacts:Email%]?Subject=[%Contacts:Value%], [%Contacts:FullName%]




    At first I couldnt get it to work but figured out I didnt have a space after the comma, VERY important!

    Thanks again!
    • Marked as answer by Seven M Thursday, January 20, 2011 6:39 AM
    Friday, January 8, 2010 8:50 PM

All replies

  • You can set the hyperlink field by using a string variable and use a 'dynamic string build' action.

    1. From a WorkFlow Designer window, click "Variables..." button, and add a variable with String type. Let's name the variable 'CustomLink'

    2. Click 'Actions...' button, choose 'more actions...', and select 'Build Dynamic String' action.

    3. On the build dynamic string action, click 'dynamic string' link to open a String Builder window. Construct a string. Typical formating should be something like:

    [%Contacts:HomePage%], [%Contacts:FullName%].

    If you'd like to display email link the formating should be something like:

    mailto:[%Contacts:Email%], [%Contacts:FullName%].

    4. On the build dynamic string action, set the variable to the new variable that you created from step 2.

    5. Now click 'Actions...' button, and add 'Set Field in Current Item' action.

    6. Set the 'field' to the Hyperlink field that you'd like to update through workflow

    7. Set 'Value' by configuring Source to Workflow Data and Field to the new variable that you created from step 2.

    8. Click 'Finish' to close the workflow.

     

    I hope this will help.

     

    • Proposed as answer by kalyan93 Thursday, January 29, 2009 9:23 AM
    • Marked as answer by Mike Walsh FIN Thursday, January 29, 2009 9:44 AM
    Monday, April 9, 2007 10:09 PM
  • hey Halox_69 thnq so much.. u saved tons of time when I was in the situation of picking my hair... 

     

    Thanks a lot

    Thursday, January 29, 2009 9:23 AM
  • This worked like a champ!
    Wednesday, January 6, 2010 4:44 PM
  • Thanks so much, very helpful, I had the requirement of adding the subject line to the email so I used the following:

    mailto:[%Contacts:Email%]?Subject=[%Contacts:Value%], [%Contacts:FullName%]




    At first I couldnt get it to work but figured out I didnt have a space after the comma, VERY important!

    Thanks again!
    • Marked as answer by Seven M Thursday, January 20, 2011 6:39 AM
    Friday, January 8, 2010 8:50 PM
  • Hi

    I"m trying to follow your steps byt I don"t find in Sharepoint designer 10 , in Actions ... more actions and Build dynamic String action?

    I have Sharepoint 10 Foundation

    Thanks

    Irith

    Tuesday, July 31, 2012 9:46 AM
  • Hi Irith, I couldn't find it either, BUT I've found what I believe is the "Build dynamic String" action in SP2010:

    When you make your workflow update the formatted hyperlink field, you <add> the field in the <Update List Item>, you "Set this field:" to the <formatted hyperlink> field you created and in the "To this value:" section, just click on the <...> button in the right section to open the <String Builder>.

    I believe this <String Builder> is the equivalent version of the <Build dynamic String> action from the old SP2007 drop-down menu choices.

    I've also found you should write there:

    URL, Description

    Very important: have a ", " meaning a comma and a single space after the URL, followed by the description.

    Source: http://blog.sharepointrx.com/2010/05/04/setting-the-url-and-hyperlink-description-simultaneously-on-a-url-field-in-a-sharepoint-designer-workflow/

    Hope this helps !

    P.S. Also very important, I've found out after several failed tests that this ONLY WORKS with a simple "Hyperlink or Picture" Column Type, and NOT with a "<label for="ctl00_PlaceHolderMain_NameAndType_TypeOfColumn_FieldTypeSelectionControls_L_onetidTypeLink">Hyperlink
    with formatting and constraints for publishing"</label>

    P.P.S. If you don't have a <Build dynamic String> window opening when clicking the <...> button to build the formula, try using an auxiliary variable before making the update, of String type, on which you can set the value using the formulas provided by the <Build dynamic String> window.

    • Edited by Enoeth Monday, August 6, 2012 8:55 AM
    Monday, August 6, 2012 8:15 AM
  • This is an old string of posts but I thought it would be worth updating. For MS 2010 the action has changed to "Extract Substring from Index of String." 
    Wednesday, September 17, 2014 5:59 PM