1

I am having some trouble getting this to work. I need to create a hyperlink in a column and learned that if you put some html into a calculated field and format it as a number then it works. For example:

="<a href='SiteUrl/TaskerDocuments/"&[DS/F Attachment(s)]&"'>Attachment(s)</a>"

Now I've tried to do a the following =IF(ISBLANK([DS/F Attachment(s)]),"N/A","="<a href='SiteURL/TaskerDocuments/"&[DS/F Attachment(s)]&"'>Attachment(s)</a>"") but that doesn't work. Any ideas on how to achieve this?

I only want to display the link when a certain field that the link references contains information and say N/A when it doesn't.

I am stuck. Please help!

0

You have to be carefull with opening and closing quotes

I copy/pasted your formula (start with 4 spaces so StackOverlfow displays it like code), only added some new lines and spaces for readablity

=IF(
    ISBLANK([DS/F Attachment(s)])
    ,"N/A"
    ,"="<a href='SiteURL/TaskerDocuments/"
        &[DS/F Attachment(s)]
        &"'>Attachment(s)</a>""
   )

I haven't tested the formula below but think I got all your typos out;

When you experience problems with Formulas its best to open Notepad and format the Formula with linebreaks and spaces. SharePoint will ignore all linebreaks and spaces (not in SP strings).

You can copy/paste this in the Calculated Column Formula,

=IF(
    ISBLANK([DS/F Attachment(s)])
    ,"N/A"
    ,"<a href='SiteURL/TaskerDocuments/"
        &[DS/F Attachment(s)]
        &"'>Attachment(s)</a>"
   )
  • Thank you! This worked. Much easier to look at it the way you did. Thanks a bunch that saved me a lot of frustration. – Xeverus Feb 25 '15 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.