6

I've searched the web and found a solution.... IF I WAS USING 2010 or 2007.

I have cascading selections referencing two different lists that hold the dependencies as lookup columns. My cascading selection then has to reference these lists as a lookup as well. They're being displayed in my AllItems.aspx list view has hyperlinks (just like any other lookup). However, I don't want users to see these links or these two other lists.

I see that in 2007 or 2010 you can open the view in Designer and click the tag inside the WYSIWYG editor and remove the link there. How can this be done in SharePoint 2013?

2 Answers 2

13

Solving this problem in the list view can be done simply and without opening SPD:

  1. Make sure the value you want to display for the lookup column is also selected as one of the "also show these columns" choices for that lookup (yes, you can include the most helpful column as both the value for 'In this column' as well as tick it in the additional fields list)
  2. (Optional) Edit the display name of the new additional column if you like.
  3. Edit the list view and swap the main lookup column for the additional column.
1
  • +1 for a simple, no-code solution! Note, however, that with this approach, the hyperlinked lookup column will still appear in the Display and Edit forms. Also, thanks for answering my unasked question of "Why would I ever want to include the column I'm performing my lookup against in the additional fields too?" Jul 16, 2015 at 17:08
3

I know that this is two years later, but I found this question whilst looking for the solution, and I believe that there's a simpler solution just by using an example in Microsoft's documentation.

It is code, but it's just copying and pasting Microsoft's own code which literally states that it will display the value of the field.

So if you follow that link it's regarding column formatting, specifically with JSON.

They provide 3 examples there, and the third is displaying LOOKUP column values (because they would otherwise resolve with "OBJECT"), the code for which is thus:

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "@currentField.lookupValue"
}

This completely removes the link from the value by simply showing the ... value. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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