locked
formating the hyperlink in the hyperlink field RRS feed

  • Question

  • Hi,

    I'm sorry if the title of the question is confusing.

    I have a hyperlink field in my list. When I create a new item in the list, a workflow puts a hyperlink in that field for that item. For example : http://www.google.com

    Now I don't want this hyperlink to appear. Rather I would like a text like "Google" to appear, which should be clickable. Is it something doable from within the workflow.

    I tried to put url followed by a comma and description, but both appear :(

    Can you please help me in this.

    Many thanks for your reply !

    Kind Regards,

    prajK

    Friday, February 6, 2015 2:03 PM

Answers

  • Hi,

    As I understand, you want to change the format of the hyperlink in the hyperlink field.

    For this issue, can you give me the screenshot about your workflow?  

    I tested the same scenario per your post in my environment, and the hyperlink field worked fine.

    You can test with the steps below in your environment:

    1. Open SharePoint designer 2013 and create a workflow for the list.

    2.  Add an action “set workflow variable” to add the URL and description such as “http://www.google.com, google”.

    3. Add action “set field in current item” to set the hyperlink field to the workflow variable you have created.

    Best regards


    Sara Fan
    TechNet Community Support

    • Proposed as answer by Shakir Jahir John Tuesday, February 10, 2015 12:00 PM
    • Marked as answer by John.P.Smith Tuesday, February 10, 2015 5:37 PM
    Tuesday, February 10, 2015 9:42 AM

All replies

  • The field type of hyperlink field is SPFieldUrlValue. You need to set its properties Url and Description.

    See this for more information:

    https://msdn.microsoft.com/library/Microsoft.SharePoint.SPFieldUrlValue


    Nadeem Yousuf

    Friday, February 6, 2015 3:16 PM
  • Hi,

    As I understand, you want to change the format of the hyperlink in the hyperlink field.

    For this issue, can you give me the screenshot about your workflow?  

    I tested the same scenario per your post in my environment, and the hyperlink field worked fine.

    You can test with the steps below in your environment:

    1. Open SharePoint designer 2013 and create a workflow for the list.

    2.  Add an action “set workflow variable” to add the URL and description such as “http://www.google.com, google”.

    3. Add action “set field in current item” to set the hyperlink field to the workflow variable you have created.

    Best regards


    Sara Fan
    TechNet Community Support

    • Proposed as answer by Shakir Jahir John Tuesday, February 10, 2015 12:00 PM
    • Marked as answer by John.P.Smith Tuesday, February 10, 2015 5:37 PM
    Tuesday, February 10, 2015 9:42 AM
  • Hi Sara,

    Thanks for your response. It worked for me. Awsome. :)

    So is there a way if my destination field is a text field and i can still format. I mean what if my field is of type "text field" instead of type "hyperlink" ? Is there a way for that too ?

    Because, i also tested this with text field, but didn't work with that. I was just curious to know. 

    thanks again. 

    Regards

    Tuesday, February 10, 2015 5:39 PM